#help-development
1 messages · Page 976 of 1
i haven't
it feels good
Yea
i should look at that
When the server isnt dying
That one doesn’t pull you towards the hook though
Yea, it just launches you
It just launches you when you reel it in
yeah
Well, the skyblock one anyway
it launches you to the direction of hook
thats how it works in wynncraft too
I worked together with a friend on that
Look at the event part, its pretty simple
idk if I want it to work like that 🤔
Well thats something near the hypixle one
but thanks
something to consider
I could also try adding to the velocity based on the players current velocity away
whats the best way to make a line render between two entities? A leash?
Yea probably
yeah i think
I wonder if theres a packet way to make a guardian line track the player
you can just spawn a guardian
make it invisible
and set target to player
wont it damage the player
and cancle guardian's movement and attack
for some reason when the hook is in the players velocity is like?
set to 0 every frame? its as if its getting the velocity from the last from and using that for the current one
dw about audio in clip lmao
nah
Wrong game
Forgor
the thing where you get loot and sell
Lethal company
Me to
Unsure
weird, setting it each fram might just fuck up movement
ok I cannot figure out how to make it work like before
does anybody know the scaling of the velocity?
is it like blocks/tick blocks/s or something else
and also how strong is gravity
The Minecraft wiki is great for finding such information
I wasn't sure if velocity is the same as motion
ty
how can I load a world from a file path?
you don't
world = WorldCreator.name(new File(INPUT_DIRECTORY, map).getAbsolutePath()).createWorld();
this did not work
WorldCreator only accepts a String world name
why arent you using lambdas
Ok, so. I'm at my wits end. My plugin keeps being large... Like. Around, 17mb large? I know it has to do with dependencies, but I just can't figure out how to optimize them, or how Maven works really
no
?paste
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
Predicting this to be deprecated for removal on paper API
nah, that never happens in here 🙂

I mean, what API version do you depend on
It was released mid 1.20.4 iirc?
(on spigot at least)
do you also have vault as a dependency?
wdym
?paste your pom then
Your build.gradle.kts then
got no that
i'm going to guess you added spigot.jar to yoru project manually?
Ah
Yea so
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
build path configure stuff... spigot server
Use a proper build system to manage your dependency
Your jar might just be outdated as fuck
where can I learn this?
?maven
Merci for the link XD didn't know the command
Looked at the nms internals on how it identifies the world folder, and it just does new File(worldContainerFolder, name), so I was able to just this instead: world = WorldCreator.name(INPUT_DIRECTORY_NAME + '/' + map).createWorld();
I remember there being something being very broken about loading worlds from outside the main folder, but I don't really remember what exactly
can't you do absolutely wack things like create a world named ../../../../../../../whatever and stuff?
hi! anyone know if there is any way to maintain the nickname of the player white while we change the color of the scoreboard Team? Without use of packets
anyone know how to move schematic pasted using my plugin down 1 block every like 2 seconds? every method i tried caused server to crash
Use the reset code after the team name
player.setPlayerListName(ChatColor.RESET + player.getName()); like this?
https://gyazo.com/3bb8ec1fee85a89766ce580dd734d92b
https://gyazo.com/49189634b1b4d0e95930212d1c6ca007
Does anyone know how to change the thing to "MCMETA file" instead of just a normal text document?
File 1: The texture
File 2: The thing i need help on
How do you make a trident texture?
Paint, Aseprite, Photoshop, some online pixel tool. The choice is yours.
No I mean like the trident model itself
Blockbench
The trident model and the one in your hands are different, because mc doesn't just extrude them
so whenever I get and then set the players velocity they are no longer able to move with wasd
how would I let them
Dont overwrite their velocity. That should help
💀
so what do I do instead
how do I change their velocity every tick
is that impossible
To achieve what exactly?
i just want to add a force
im just adding to the existing velocity and then setting it back. Hell even if I dont do anything to it it still cancels movement
If you want to add a force, then take what they have and add your force to it, instead of completely overwriting their movement with your force
thats what im doing? I thought so
even if I remove the second line it does the same thing
So what exactly is the goal? Why are you trying to add velocity
grappling hook
When are you adding this velocity?
in the code I showed
velocity = velocity.add
oh
this is in a scheduled runner
thats probably the issue huh
A sheduler schould work just fine for that
This looks completely fine to me...
Apply the velocity towards the arrow and run the scheduler more often
this is when I literally just get the velocity and then set that same velocity back
without any modification
you can see the issue
its like reseting the movement idk
- its already doing that
- its running once a tick
Just... create a vector towards the arrow, give it a fixed length and add it to your current velocity.
I would not add any velocity if the player is currently on the ground.
thats not answering my question
why does setting the velocity to the players current velocity fuck up the players movement
when you shoot the arrow all your running speed is just stopped
even if I dont modify the velocity at all
It shouldnt
it does bro
ok my guess
is that by the time the player gets the packet for the velocity change its already been a bit of time
so this might not be super possible
It will always be a bit janky
As you said the client controls the movement so it will be thrown of if the velocity is forcibly changed
yeah
Especially if you do it every tick
Have you tried using the PlayerMoveEvent for this?
that might help but I think ill try something else
I got kicked for flying on my own server
what causes being kicked for flying?
for(float i = 0;i < d.length();i += 1) {
player.spawnParticle(Particle.SMOKE_NORMAL,player.getEyeLocation().add(d.normalize().multiply(i)),1);
}
im trying to spawn particles in a line but
- only the first one spawns
- it has a random high speed
well... it's almost what I want lol
Ur a sweaty gamer
The crappy vanilla fly detection, you can disable it in server.properties
https://gyazo.com/7a963e1a860f646d4af8609fc4b076e1
Idk I think this looks fantastic
Well there are going to be different "stages" if you will, randomized ofc during each season so spring for example might start a light rain as seen above or perhaps a heavier rain which will just come with particle density... As for the case of which particle to use, I'm still experimenting
https://gyazo.com/a0e31298c291d4bd5e864ea94a19b699
this is what I've got for snow, to be fair I need to spawn them a bit higher
my brother in christ do you need help or are you just gonna spam videos
i also still think vanilla rain looks better
I really wanted to say something mean but decided against it
The only help I need is figuring what would make this look better... hence the visual aids
Isnt that possible in 1.20.5? Or does that come in 1.21 where you can simply set the scale of any entity in the game
It's gonna be
Yes, 1.20.5
how have i not heard of this
Noice. Together with the item component system thats gonna be a lit update
Late to the party I suppose
wait is it already in the snapshots then?
I swear I saw smile messing with it a while back
Yeah. And also a ton of other new attributes like "reach" which lets you place blocks further away
Is that specific to block placement?
does api stuff come after full release or is there api for snapshot features already
Block breaking is also influenced. Attack distance is a separate attribute that comes as well.
Gonna be nice to have some variation in the combat system. Imagine having spears with a longer attack range but slow attacks
vs daggers with a short attack distance but ADHD 1.8 attack speed
you can basically do that already but thats a nicer way to do it i guess
no theyre gonna stick to their decade old update because they refuse to use 1.9 combat
True
XDD this might be fun
Or a planet system with its own biomes and gravity
step height is also a thing?!
Ouh... custom break speeds are gonna be way easier.
Or protecting certain regions in factions where you have 90% less break speed

There technically is but not for you :p
It’ll come after full release
aw man
approximately how long does it generally take to have all the new stuff be stable enough for us normal people to use?
?eta
There is no ETA. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.
Usually its released quite quickly, but this is a pretty big update with lots of internal changes. So might be a while.
https://paste.md-5.net/ehowevaroq.java
Can I get some notes on this? Also I need some help with autumn effects, I was trying to use isOccluding to determine if they're like under a tree but it doesn't seem to work
What if you force an attribute onto a boat
Will it do nothing?
it will do nothing since the code wouldn't try fetching such things
assuming there is even a spot to put attributes to begin with
you can't
@EventHandler
private void onInventoryClick(InventoryClickEvent event) {
ItemStack eventItem = event.getCurrentItem();
if (eventItem == null) return;
for (ItemBuilder.Item item : UNTOUCHED_ITEMS) {
ItemStack originalItem = item.getOriginalItem();
if (eventItem.isSimilar(originalItem)) {
event.setCancelled(true);
return;
}
}
}
Why does this code work fine in survival, but when I'm in creative (the goal for this event), it doesn't work and the item duplicates
Creative things man
Do a check if the player is in creative and cancel the event then with a "you cant do this in creative" and return
but that'll still dupe the item
☹️
Even if you cancel and return early?
wdym early? that loop is just for comparison purposes and the return just ends it all so it doesn't keep going
Right you do a check for the players gamemode before this logic and return there (early) if they are in creative
well
then they would still be able to move the item around
🤔
You should also cancel the event (I don't think so in this case, because then I don't think you could click any inventory in creative)
why not just
@EventHandler
public void onInventoryCreative(InventoryCreativeEvent event) {
Player player = (Player) event.getWhoClicked();
ItemStack eventItem = event.getCursor();
if (eventItem == null) return;
for (ItemBuilder.Item item : UNTOUCHED_ITEMS) {
ItemStack originalItem = item.getOriginalItem();
if (eventItem.isSimilar(originalItem)) {
player.sendMessage(ChatColor.RED + "you cannot do this in creative mode!");
event.setCancelled(true);
break;
}
}
}
oops
ok there
Oh I forgot about that
this doesn't solve the problem though
@EventHandler
private void onInventoryClick(InventoryClickEvent event) {
ItemStack slotItem = event.getCurrentItem();
if (slotItem == null) return;
ItemStack cursorItem = event.getCursor();
for (ItemBuilder.Item item : UNTOUCHED_ITEMS) {
ItemStack originalItem = item.getOriginalItem();
if (slotItem.isSimilar(originalItem)) {
event.setCancelled(true);
return;
} else if (cursorItem.isSimilar(originalItem)) {
event.setCancelled(true);
return;
}
}
}
I'm pretty sure it does for the creative issue
it doesn't
Why
because it duplicates the item...
by just left clicking on it
not middle clicking
I'm not sure man I'm a bit cooked right now
because the creative inventory is silly
but I bypassed it
covers all of the cases for clicking
offhand event is another thing but there's nothing that needs to be done for bypassing there
the key part is to set the slots back every time, otherwise in certain edgecases (typically having to do with a combination of the drop and click event) you can lose the item entirely
the inventory null check isn't necessary
you're good! I appreciate your help
for anybody who stumbles upon this issue and code in the future, this is the last event I added for another edge case:
@EventHandler
private void onInventoryClose(InventoryCloseEvent event) {
Player player = (Player) event.getPlayer();
if (player.getWorld() != plugin.getSpawnWorld()) setItems(player);
}
how do i set glow color??
using teams
Looks like someone forgot to enable 2FA
Gogo @austere cove
Done
will this break anything?
use teh main scoreboard
else you have to add everyone to your new board
and you are currently creating a new scoreboard every method call
lastly, try to get the team before you add new. they are persistent so creating one that already exiusts will error
iejava if ((team = scoreboard.getTeam(TEAM_NAME)) == null) team = scoreboard.registerNewTeam(TEAM_NAME);
so i can remove the upper method?
yes
rashvebi jima
talk english
speak english*
speak english 😗
Please utilize the English language for communicating in the SpigotMC server.*
public static void addToTeam(String teamName, UUID uuid) {
ScoreboardManager manager = Bukkit.getScoreboardManager();
Scoreboard board = manager.getMainScoreboard();
Team team = board.getTeam(teamName);
if (team == null) {
team = board.registerNewTeam(teamName);
}
team.addEntry(uuid.toString());
}```
somehow this one doesnt work?
no errors but glowing color doesnt change
mb
player
oh
?stash for me
it works
can i somehow prevent the displayname color being changed? or will some nametag plugin do it itself?
Hey guys quick question the remapped-obf.jar dont include any spigot and bukkit code?
Unfortunately, I’m still a bit confused with the use of the specialsource-maven-plugin, unfortunately I can’t find any documentation
Thanks but can someone tell me the process which the code is going through when using the maven plugin?
It just replaces Mojang names with obfuscated names
does every world have a level.dat file?
For BungeeCord, on a PlayerDisconnectEvent, sometimes player.getServer() returns null.
I made sure to delay by 50ms. Is there a solution to this?
It seems to happen randomly
Hi, I have a question about OrmLite and HikariCP, I am connecting to the database using hikari with new HikariDataSource but OrmLite methods requires ConnectionSource (com.j256.ormlite.support.ConnectionSource;), How can I use HikariDataSource on OrmLite methods_
theres an event listening for right before the player leaves i think
how can I get the block someone is looking at?
in place range or any range?
place range
getTargetBlock
I think range for teh default client is 8 blocks? https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/LivingEntity.html#getTargetBlockExact(int)
but you can ask for any range
is this correct usage? new DataSourceConnectionSource(dataSource, dataSource.getJdbcUrl());
i doesnt use that database, but sure 💀
Ok, thanks for help.
how can I set a item frame to be invulnerable, since setInvurnerable() doesnt account for being stuck in blocks, which breaks it anyways
i mean i don really know the usecase
but how about u just donz allow placing blocks on top of them
How do I make a nms plugin multi version compatible cuz I think it will be very tricky
this is what im using. i want to set the item frame to be on the side of the block im looking at
how can I do that?
Use reflection or abstraction
Hey guys
I’m trying to make that my ban plugin can also ban offline players
It doesn’t work tho
Can anyone tell me where the problem is?
Yes it tells me null in the console
show me the entire stacktrace and class please
No if the player is offline, then ban the args[0] I’ve written
It's not working because you're still using the null target
how can i get what face of a block someone is looking at, and then attach a itemframe to that face?
So OfflinePlayer target = Bukkit.getOfflinePlayers(args[0]);?
???
yh and also
your null check doesn’t make sense
How
'getDescription()' is deprecated?
no
paper 👀
💀
How is that possible?
I did if (target == null)
How does that not make sense
It's possible when you ignore us when we try to get you to learn java
and then using it anyways
„Hey does this person exist?“
„No!“
„Okay whats their name?“
I never used something if I’ve been told not to use it
It’s just I get multiple advices
One tells me right the other tells me left
after your null check you should be checking against teh offlinePlayer not target
you could simplify all this by gettign the offline player at teh start and do everything you want to do, then check if they are online for sending messages
even if they are online there will be an OfflinePlayer object for them
Egitto. Ima tell you this as nice as i can.
When you know 0 java 99% of time you will think you are following someones advice but you arent.
Imagine trying to cook a turkey and the instructions are made for people that have experience in cooking. You have 0 idea what 1 table spoon is so you will just fuck it up.
Its similar with spigot. If you know 0 java you wont be able to use spigot propperly
You have been stuck with the same problems for days
anyone with simple java experience couldve solved them in 20 minutes.
And somene actually knowing spigot
maybe 2 minutes
so how about instead of spamming this channel with stuff and then not even understanding the advice
LEARN JAVA.
EVERYONE IS TELLING YOU
So if (target == 0) { if (Bukkit.getOfflinePlayers(args[0])) { blah blah blah?
no
this proves the point
fr
don't bother with this anymore ig
at teh very beginningjava OfflinePlayer oPlayer = Bukkit getOfflinePlayer(args[0]);
Why are you always spoonfeeding him instead of getting him to put that effort into learning java?
if (oPlayer == null) they do not exist so message teh command issuer and return
yes leave a tiny error that will make him learn lol
Under that condition I'll go out and buy pay someone to make me delicious meals.
It doesn;t matter if the player is online or offline for any of yoru ban code. It only makes a difference for sending ban/confirmation messages
Ok I did it
I now need to code the thing that comes under the check for target == 0
Ill try out myself
no you should look up what a table sppon is
target == 0?
how can i get what face of a block someone is looking at, and then attach a itemframe to that face?
Block#getFace ig
you would have to perform a RayTrace
can you send a example?
you can get teh collided Face in the result
but how do i attach the itemframe?
raytraceBlocks....
Player#rayTraceBlocks
get collision face...
get teh block opposite and place yoru frame
adjusting teh facing to match the hit face
For food I go to either my local butcher that has ready prepared lunch, get to a restaurant to buy a delicious meal.
Some delicious salmon and sweet bell pepper with salt and pepper or even a very delicious Spaghetti Bolognese is something I prepare myself.
cup as a measurement is my bugbear
US and UK use a different measurement
even then, Cup? really
gotta check from where the recipe is yk
really important
(i personally just do an eye measurement like 99% of the time)
((ItemFrame)mcLifePlayer.placing.itemFrame).setInvulnerable(true);
((ItemFrame)mcLifePlayer.placing.itemFrame).setOp(true);
RayTraceResult rayTraceResult = event.getPlayer().rayTraceBlocks(8.0);
mcLifePlayer.placing.itemFrame.teleport(rayTraceResult.getHitPosition().toLocation(Objects.requireNonNull(event.getPlayer().getWorld())));
((ItemFrame)mcLifePlayer.placing.itemFrame).setRotation(rayTraceResult.getHitBlockFace());
What do with the getHitBlockFace to get a rotation?
isn't the rotation for the item inside the itemframe?
yes
oh
you neeed to set Directional not rotation
((ItemFrame)mcLifePlayer.placing.itemFrame).setFacingDirection(Objects.requireNonNull(rayTraceResult.getHitBlockFace()));
that is one of the lines of code of all time
looks ok. If it wasn;t kotlin I could tell better
works!
why u got them random object require non null in there
u realize if its null that wont save u
it will still throw an exception
then why does it work 😆
Can i instert a clickable link to a kick message?
Why doesn't my server print hello world? I see via console my server loads it, it just doesn't call the logger
package org.timothy.example;
import org.bukkit.plugin.java.JavaPlugin;
public final class Example extends JavaPlugin {
@Override
public void onEnable() {
// Plugin startup logic
getLogger().info("Hello World");
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
}
- Do you have a plugin.yml 2. is it throwing errors?
- Yes, 2. no
send it
How do I check 2?
look at the console
plugin.yml
name: example
version: '${project.version}'
main: org.timothy.example.Example
api-version: '1.19'
what does /pl output
is it red or green
green
?paste then send your console output here
it may be that you are using old version(?) where you didn't add that log message
it does print Hello World
Oh I was looking under loading
ctrl + f 😛
You made it print that onEnable not onLoad
Okay I'm sorry for my stupidity
Do you still need NMS to change the block break progress of ap player
How can i instert a clickable link to a kick message?
Hi i have a question , how would i have a map rotation map?
so i have a ffa plugin , and i want to add a map rotation , lets say every 20 minutes the map change
and players move to the new map
how would that work? ideas?
Is it possible to refresh plugins while the server is running?
TextComponent txt = new TextComponent("Text");
txt.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://your-website.com"));
i dont think so
only /rl
or use plugman
yeah
Reloading and using PlugMan is highly unrecommended tho
Make sure you know what you're doing :)
Does this work if I build the plugin in the middle of the server being up?
2 methods either have all maps on one world then just tp them every 20min 2nd method: load map you need then tp them
I tried this, and it doesn't work, but when i send the same message to the chat, it works normally.
oh I missread I dont think that is possible
Player#kickPlayer takes a String not a Component. You will need to use Paper's Player#kick method as it takes a Component so you can add a click event
haiter would now drop a ?whereami
I am just giving him the solution, he is not using Paper
well, i'm on spigot, so Player#kick isn't there i supose
yeah I know but still your basicly telling him to switch to paper while on spigot dc
Yeah if you want to add that functionality you need to use Paper
I want to be compatible with both paper and spigot at the same time
go to Paper
Yo in my server I cant join because its gone to 1.20.5 anyone know when it will update?
?
Ok, thx guys
I am not, I am just saying that you need Paper to do that
And can't i make this function myself?
Maybe i could just copy the one from paper...
This code doesn't fire. I implemented Listener but still nothing. And yes, I checked ALL throughout the console ```
@EventHandler(priority = EventPriority.NORMAL)
public void onJoin(PlayerLoginEvent e) {
getLogger().info("Hello");
Bukkit.getServer().broadcastMessage("Hello");
}
Its PlayerLoginEvent now but I also tried PlayerJoinEvent
both don't work
You seem to not have registered the listener. Also revert back to PlayerJoinEvent for this
How do I register my listener?
I'd recommend watching a simple listeners tutorial on youtube :>
Did CafeBabe die
?event-api
I just thought a video tutorial would make more sense to you than a text tutorial or just spoonfeeding the code :/
ah okay
do yk when 1.20.5 releases? on servers.
how do I get an inventory name for events if getTitle() is deprecated ?
declaration: package: org.bukkit.inventory, class: InventoryView
I see no deprecation
you are not using spigot then
How do I make a player break a block with particles
Player#breakBlock doesn't spawn partciles
Is there no tool component in spigot 1.20.5? Just having a look at the API, and I see the FoodComponent and ItemMeta.setFood but not tool
well simple thing would be to spawn particle onblock break, could be other ways aswell
PR welcome
Not strictly spigot related but do yall know how I could redirect the target/ directory in intellij to the plugins directory in my server so i don't need to constantly move the plugin htere after every build
you can choose where it builds the jar in maven/gradle
also is u do that i recommend doing maven profiles if there is multiple devs or its open source so it wont affect other peoples builds
symlink 😉
never been fan of those cant remember even why i dont like them
im noob at java with 4+ years of experience, what is a good file io lib I can use to copy and edit around files in the resources folder for my plugin?
to be specific I wanna edit and copy a datapack I am working on when I create a world with my plugin
windows supports symlinks, so anything using windows should support symlinks also
Hm
There is a maven plugin that lets you run script files whenever you compile your plugin
I remeber seeing somewhere that symlinks arent visible to programs
what are script files?
right
but I wanna edit stuff in the jsons and stuff
sure I can use bat or whatever but I was wondering if I could just do it in java like the rest of the plugin
I also wanted to add config options for it
so it would be kinda annoying to read the config file from bat
Ohh, I thought you meant that you are working on your datapack and want to copy it from your world inside your plugin. But you instead want to modify the datapack while the plugin is already installed? You shouldn't modify the jar during its runtime, and I doubt that you even can easily without crashing it. You should rather copy the datapck file inside your plugins folder and modify it like that later on
I have datapacks in the resource/plugin folder
I want to whenever my plugin creates a world, open, edit and copy that edit of a datapack into the world folder
Are you talking about the resources folder in maven or the plugins/<your plugin> folder?
I assumed they are the same
whats the difference
maybe its a mistake in how I manage tye config files but thats the assumption I had
In the resources folder you put everything misc that you want to bring with your plugin. It is fixed, you can not modify it after you compiled your plugin. You may e.g. include your default configurations files in there. The plugins folder is where you store all your dynamic, per-user data, such as player stats, modifiable configurations etc
Just use the regular java file api
that has like a billion classes
most other languages I used had a standard way to operator on files
Path a = new File("...").toPath()
ill take a look at that, thanks
You're welcome
For BungeeCord, how do I distinguish a ServerDisconnectEvent from a ServerSwitchEvent? 😭
I wanna handle the event ONLY when the player leaves the proxy, but I also need access to the previous server the player was on
Do I need to just keep track of this stuff myself?
I think I have an idea.
Whenever a player is disconnected from any server I can make a class that keeps track of the server names, then when a player leaves the proxy I can just read from that list
kind of jank but 😭 idk why there's 2 events that overlap with the same thing in the API
if the switch event also fires on disconnect you don't need the disconnect event
Wait then why does ServerSwitchEvent and ServerDisconnectEvent both exist
It also differs from the totally different "ServerKickEvent" for when a palyer is kicked from a server 😭
i'll probably just use DisconnectEvent because i'm already using Switch for somethign else, it might be better to abstract it this way for now
Was there any new API released in the 1.20.5 spigot update? I was looking to see if setting scale was already added, I completely understand if not as it's only been a couple hours haha
It's an attribute
np haha
GENERIC_SCALE
ahah 
Does scale still exist for phantoms? I presume not?
It uses the attribute
In that case is setSize within the Phantom class expected to be deprecated?
Eh, I guess phantoms still have it in NBT so it's probably separate
Wiki says it's akin to the "size" of slimes
Oh funkyy
,
EntityType.DROPPED_ITEM was renamed to ITEM in 1.20.5 right? should probably be mentioned in the spigot thread
many things were renamed iirc it'd be unrealistic to name them all
they were most generally brought into parity with vanilla naming
Hi y2K
hi
i'm fine with that, just giving feedback, maybe they could have missed it
Carnetmc cooking right now?
CabernetMC*
I'm too busy to be coding anything at
You're fired after the next one man
you can't fire me from my own project
I bought the land your company works on, soooo...
Do you know where can I actually see all the old names and the new naming now?
their is no full list, you could look at old JD and compare with new JD, but the easiest method is to just go to the most logical next name and let your IDE do the heavy lifting. There was a switch away from the old names because they were either Not accurate or just silly/bad names or just very old
well, they changed a little bit ahah
Yup
Wait, they changed the API naming?
so that has nothing to do with what I was talking about
No?
they changed some constant names in the API
Yea but not everything
its remapped at runtime for old plugins with ASM
I got scared lol
MD_5 prioritizes backwards copmatability, you dont have to really worry about that
@tepid crater https://mappings.cephx.dev/
hasn't been run for 1.20.5 yet it seems
Yeah, I'll prob have to build myself to get my hands on 1.20.5 spigot right?
probably

what language is that
die deutsche sprache
ah
ig
public static void applyAutumnEffects(Player player) {
autumnTask = new BukkitRunnable() {
@Override
public void run(){
if (player.getLocation().getBlock().getRelative(BlockFace.UP).getType().isOccluding()) {
spawnRandomizedParticles(player, SeasonsList.Seasons.AUTUMN.getParticleEffect());
}
}
}.runTaskTimerAsynchronously(NormalSeasons.getPlugin(NormalSeasons.class), 0, 10);
}```
Could I get some help with this method? I'm trying to detect if the player is like under a tree
ig leaves are occluding then, they standing directly underneath?
Yeah, but it's gotta change to check for like perhaps 4-6 blocks above the player rather than just one
That being said, given the player is standing directly under a tree where the nearest block above them is occluding, yet the particle spawning method doesnt seem to fire
private static void spawnRandomizedParticles(Player player, Particle particleEffect) {
for (int i = 0; i < PARTICLE_SPAWNS_COUNT; i++) {
randomParticleTask = new BukkitRunnable() {
@Override
public void run() {
Vector offset = randomOffset();
switch (particleEffect){
case FALLING_DRIPSTONE_WATER:
player.spawnParticle(particleEffect, player.getLocation().add(offset), SPRING_PARTICLES_TO_SPAWN, 32, -2, 32);
break;
case SNOWBALL:
player.spawnParticle(particleEffect, player.getLocation().add(offset), WINTER_PARTICLES_TO_SPAWN, 32, -2, 32);
break;
case CHERRY_LEAVES:
player.spawnParticle(particleEffect, player.getLocation().add(offset), AUTUMN_PARTICLES_TO_SPAWN, 32, -1, 32);
break;
default:
break;
}
}
}.runTaskLaterAsynchronously(NormalSeasons.getPlugin(NormalSeasons.class), random.nextInt(11));
}
}```
Also, the offset needs to be reworked for the autumn effects as well, currently the offset just gives the particles a more natural look as it were... but that's really just for winter/spring particles
clean code on its best, anyways why are you spawning multiple tasks, try printing the block directly above the player
Multiple tasks for the timing if you will for particle spawns
Makes it look better
So the fact I'm running a task to call the particle spawn task, it just creates a more randomized spawning pattern and imo makes it look better without doing so
Also what do you mean printing the block? I just need to verify the player is under a tree... Should I instead iterate through x Y levels above the player to determine if they're under a tree?
well try it
I just wanted something simple like the isOccluding method but again it doesn't seem to work for my case, do you think the block iteration to be a better method? or is there something better designed to do this check
maybe theres a Tag.LEAVES
I'm really asking to figure out the most optimized way to be spawning these particles, the randomized particle method currently iterates through particle_spawns_count (currently set to 64), that being said at most every half a second I'm spawning x particles for the player
default values for winter/spring/autumn -> 96 particles, 64 particles, 32 particles -> every at most half second
I'll keep looking, thank you sir
private static final Material[] LEAVES_MATERIALS = {
Material.OAK_LEAVES,
Material.SPRUCE_LEAVES,
Material.BIRCH_LEAVES,
Material.JUNGLE_LEAVES,
Material.ACACIA_LEAVES,
Material.DARK_OAK_LEAVES
};
public static void applyAutumnEffects(Player player) {
autumnTask = new BukkitRunnable() {
@Override
public void run() {
World world = player.getWorld();
Location playerLocation = player.getLocation();
int playerY = playerLocation.getBlockY();
int treeCheckRadius = 3;
boolean underTree = false;
for (int i = 0; i < treeCheckRadius; i++) {
int checkY = playerY + i;
Block blockAbovePlayer = world.getBlockAt(playerLocation.getBlockX(), checkY, playerLocation.getBlockZ());
Material blockType = blockAbovePlayer.getType();
for (Material leavesMaterial : LEAVES_MATERIALS) {
if (blockType == leavesMaterial) {
underTree = true;
break;
}
}
if (underTree) {
break;
}
}
if (underTree) {
spawnRandomizedParticles(player, SeasonsList.Seasons.AUTUMN.getParticleEffect());
}
}
}.runTaskTimerAsynchronously(NormalSeasons.getPlugin(NormalSeasons.class), 0, 10);
}```
I feel like this could be a lot better...
Ok that's weird... the particles basically come in bursts... not saying I don't actually like that but uh just odd
It's not the same radomization as these clips though
You could use Tag.LEAVES.isTagged(material) instead of your set btw
That's what I was hoping to find but didnt lol
uhm how could i modify fall damage? I of course could modify the entity damage event but Im not sure how to figure out if its fall damage. Also I wouldn't have access to velocity information to do a new calculation
maybe i could turn off fall damage and then... how do I detect when a player hits the ground
ok nvmd apaprently theres a get fall distance
private void applySeasonEffects() {
String seasonChangeMessage = NormalSeasons.getPlugin(NormalSeasons.class).getConfig().getString("season.season_change_message");
if (seasonChangeMessage != null) {
seasonChangeMessage = seasonChangeMessage.replace("%SeasonName%", getCurrentSeason().getName());
Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', seasonChangeMessage));
Bukkit.getWorlds().forEach(world -> {
world.getPlayers().forEach(player -> {
switch (currentSeason) {
case WINTER:
if (playerToggleVisuals.contains(player)){
return;
}
SeasonEffectsManager.applyWinterEffects(player);
break;
case SUMMER:
if (playerToggleVisuals.contains(player)){
return;
}
SeasonEffectsManager.applySummerEffects(player);
break;
case SPRING:
if (playerToggleVisuals.contains(player)){
return;
}
SeasonEffectsManager.applySpringEffects(player);
break;
case AUTUMN:
if (playerToggleVisuals.contains(player)){
return;
}
SeasonEffectsManager.applyAutumnEffects(player);
break;
}
});
});
} else {
Bukkit.getLogger().log(Level.WARNING, "Season change message is null. Make sure the configuration value is set correctly.");
}
}```
I think theres a logic error here... for the toggling purposes, since I'm using lambada for the player variable, this means any player found in the toggle list will toggle effects for all players? Or am I just cooked and I did it correct
No I did it right... I am cooked
Does someone know how i can easy sort the tbalist on player color?
Because i have for staff color &4, everyone with that color needs to be above on tab, and then &6, then &c, and more colors to go
But i have no clue how it words with teams 💀
p.setPlayerListName(Utils.colorize(config.getString(p.getUniqueId() + ".color")) + p.getName()));
p.setCustomName(Utils.colorize(config.getString(p.getUniqueId() + ".color"));
p.setCustomNameVisible(true);```
Sounds like you have to define the rank system based on the color... idk how to feel about that
People are going to have like hometown colors of the city they live in
So on tab i only want player colors that are sorted (With staff above everyone)
And maybe within the hometown colors the playernames sorted on alphabetic order
use invisible prefix colors to order them
a color then reset, then the actual color you want
So like &0&4 ?
No but the &0 will not show when you add &4
their color will be &4 but their order will be first
I thought if you just &f that resets the message?
Ahhh alright, thanks! I will try it with that
how do i check if the BlockExplodeEvent is caused by a respawn anchor or bed
nuh uh
respawn anchor is removed so it just returns air
CraftBlock{pos=BlockPosition{x=-28, y=91, z=28},type=AIR,data=Block{minecraft:air},fluid=net.minecraft.world.level.material.FluidTypeEmpty@5630d714}
its 100% getBlock() in the event. Do not use your reference to the world block
what?
is that output of the block obtained through getBlock() in the event?
or did you use a Location/reference to get a block in the world?
Someone messed up the Javadocs (probably the css).
@EventHandler
public void onBlockExplosion(BlockExplodeEvent event) {
Block block = event.getBlock();
getLogger().info("Block Explosion Detected! "+block);
if (plugin.cancelRespawnAnchorExplosionGrief) {
getLogger().info("1 ");
event.blockList().clear();
}
}
works perfectly fine for me :)
a few hours ago it was fine. If I go back in my history its fine, but refresh now it breaks
I haven't even closed by browser
it has a wierd clickable button top left now and broken formatting
poor webdev who made that
how do i put the jd into dark mode
whats recaf
another decompiler gui thing
.
wait i thought jd= jd-gui, turns out its javadocs
ic
It's a java decompiler
jd is fine in Chrome, just broken in Firefox
that Chrome?
firefox
dunno, i dont use firefox
okies
wouldve prompted me for updater otherwise ig
reset cache or smth
even teh top bar after a refesh?
he has browser addon
is it still borked without the addon?
then what is
whats with the button at the top left of the website for me
thats what IO have
sec
This is the correct (old) and working.Second is broken one
same as me. I'm not alone
:3
anyways, has anything changed with the Anvil inventory to where I can use it for player input without NMS?
or is it still impossible
wait
the explosion event is removing the block before i can get what the block is?
is my plugin just to low on the priotity list or somthing?
is that even a thing?
ig im just dumb or smt
i just wanna know if a block explosion event is caused by a bed or respawn anchor
test it with a bed and see if the getBlock is correct
beds blow up in teh nether btw
Me, for the longest time
I'd never tried to sleep in teh nether so never found out
can you use datapacks and plugins both together, I'm new to Paper and Spigot I'm coming from Fabric and Forge
odd transition from fabric to Spigot
nah
returns air
Plugins just are way more easy to configure for someone who is smooth brain I suppose lol I don't feel like learning how to mod
Plugins have no knowledge of datapacks
do i gotta make a account or is it justmy spigot login info?
need a seperate login. I just make it identical to my spigot one
so they cant be used together
why does it need my full name
no idea, I suppose. Prince and Katty perry are aliases ;0
Prince, the band ?
for me it's forever prince
I'm looking for a plugin that would have good TP functionality adapted to my needs. In other words:
-
Easily define a starting location. This location is actually only 1 block. You have to stand on it for the TP to take place.
The PT must take place after a delay (1/2s) and not instantaneously. -
Easily define an arrival location. These are precise coordinates (with yaw/pitch for orientation).
-
Avoid TP loops when a TP destination is also a starting point. In this case, for example, you need a grace period. Or simply wait until the player has taken a few steps before considering teleporting again.
-
Avoid having to place a block/panel/portal that is visible to the player.
I can obviously code it, but if I can save time I'd be happy, and I'd be surprised if someone hasn't already coded it in a way that's simple, practical for the user and optimised (PlayerMoveEvent).
you want help to dev your own plugin?
ahhmann
pretty sure this is a low priority bug
but i wanna mark it as high priority
well, it's a bug that might break some plugins soooo
Idk but it gonna be patched one day, or another
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
is this the version i use when it asks version
yeah, so 1.20.4-R0.1
No, I'm looking for an existing one. I could code it but there are a lot of already existing teleportation plugin. It would be sad to code another one. I just can't find one that fits my needs after 20m search. Maybe someone knows one adapted to my needs.
is there a newier versiojn yet
so, this is not the right channel, a more appropriated one for searching a plugin to put in your server would be #help-server, only if you look for a spigot plugin
1.20.5
am i allowewd to ask a mongodb question in here? the mongodb is used in my sevrer
do you use it in your plugin?
yes.
one of yours?
so yeah you can ask here
alright cool
java.lang.IllegalStateException: state should be: open
I am sgetting this error from my code. it occurs when i am trying to insert a document. any ideas?
MongoCollection<Document> collection = getCollection(collectionName);
try {
return collection.insertOne(doc);
} catch(MongoException e) {
return null;
}
}``` Insert code.
```@Override
public void onEnable() {
db = new MongoDB("adminDatabase");
Document doc = new Document()
.append("test", "test2");
InsertOneResult result = db.insertOne("test", doc);
Bukkit.getLogger().info("This is the result: " + result.getInsertedId());
}``` caller code
Hey how to check if a world has the playerdata of a player or if a player has allready joined on this world?
what do i put for enviroment
I never made a report in jira, but I think it's your operating system
not only linux for example, but debian amd64 netinst, or not only windows but windows 10 for example
For example operating system, software platform and/or hardware specifications (include as appropriate for the issue).
this is what it says
so it's that
i dont thinnk it really has any affect on the plugin though
- hardware specifications or/and software platform
its not required
everything is wrote lol
so im not gonna
humm, some librairies act different when the system differ
im just using the default ones
I am getting not serializable exception when using an ItemStack array serializer
Line 7
Could this potentially help? https://gist.github.com/graywolf336/8153678
Maybe you mentioned it already but what browser are you using?
Firefox
I'm getting the same strange results in Vivaldi, but I can't replicate it in Edge
I haven’t done base encoding for item stacks but you might have to close the stream to actually serialize it, I might me wrong
But then again that try catch should already do that…?
kk I'm forwarding internally. Might have just been a change in tooling. I asked if md could generate docs with the Java 21 JDK but I'm unsure if he actually ended up doing that and if that's the cause. The standard Java 21 docs seem fine
Bruh choco and I showing off our gfs
I've made a code that creates an inventory with items with coloured names and descriptions that works perfectly in 1.20.4.
But in 1.20.5 I get an error which tells me straight away that the error seems to have come from Spigot. What do you think?
Note that I have another inventory with more simplistic items that appears fine.
I'm also not using the new features in 1.20.5
CAn we see the code for the inventory generating that error?
Could be a bug with 1.20.5 that needs fixing
it's quite a big code but it's available on github
That works
I cleared my browser cache and it looks okay now
I'm too scared to clear mine
thoughts on updating to 1.20.5?
Just clear your cache within the last few weeks and you're fine
Same issue
Don't know how to do it on Firefox. On Vivaldi it's Ctrl + Shift + Del
I mean, the code I was using did work until last build of 1.20.4
ItemStack serialization seems to be broken (needs confirmation, maybe there's now a builtin method in the API for this)
for production? no, wait at least a week.
Yeah give it at least a week, bare minimum
clearing cached web content fixed it. kept my cookies and logins
Perfect
Inventory bug 1.20.5
Hello, I got this error when adding nms 1.20.5 in my project :java cannot access net.minecraft.world.level.biome.Biome cannot access org.bukkit.craftbukkit.v1_20_R4.block.CraftBiome cannot find symbol cannot find symbol
Here is my code : https://github.com/Paulem79/FallingLeaves-spigot/tree/master
The most interesting part is this commit (and it's the only interesting part) : https://github.com/Paulem79/FallingLeaves-spigot/commit/e1cce950f36f007caa7f3cf02c8541f89434a593
v1_20_R4
yeah... ?
and 1.20.4 is v1_20_R3
Nice
so, how can I fix cannot access net.minecraft.world.level.biome.Biome and org.bukkit.craftbukkit.v1_20_R4.block.CraftBiome ?
Report in Jira and wait a couple days. Could be a tooling issue.
unless they changed the nms name but i doubt that
?jira
okay so let's report
https://hub.spigotmc.org/jira/projects/SPIGOT/issues/ This is the right places for the jira reports right?
Yes
alright then
Tis simply a minor fucky wucky
so well, here it is https://hub.spigotmc.org/jira/browse/SPIGOT-7619
NMS is not a bug
unless you can specifically point to it actually being some fundamental flaw with Spigot, you're on your own
okay
NMS changes each version, you're not guarantee to just copy paste code and have it work
but well, my code is correct for the IDE
I can't remove a jira report?
Anyone else not able to trigger sendSignChange() on 1.20.5? Will file a JIRA but wanted to see if anyone else had issues
[14:52:38] [Server thread/WARN]: at net.minecraft.network.protocol.game.PacketPlayOutTileEntityData.a(SourceFile:30)
[14:52:38] [Server thread/WARN]: at net.minecraft.network.protocol.game.PacketPlayOutTileEntityData.a(SourceFile:35)
[14:52:38] [Server thread/WARN]: at net.minecraft.world.level.block.entity.TileEntitySign.l(TileEntitySign.java:323)
[14:52:38] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_20_R4.entity.CraftPlayer.sendSignChange(CraftPlayer.java:814)
[14:52:38] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_20_R4.entity.CraftPlayer.sendSignChange(CraftPlayer.java:789)
[14:52:38] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_20_R4.entity.CraftPlayer.sendSignChange(CraftPlayer.java:784)
[14:52:38] [Server thread/WARN]: at com.badskater0729.worldwidechat.listeners.TranslateInGameListener$3$1.run(TranslateInGameListener.java:233)
[14:52:38] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_20_R4.scheduler.CraftTask.run(CraftTask.java:82)
[14:52:38] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_20_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:415)
[14:52:38] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1397)
[14:52:38] [Server thread/WARN]: at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:402)
[14:52:38] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1293)
[14:52:38] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1064)
how do I get buildtools to use the right maven version? It's failing to compile
Looks like it's using your systems maven install which old
Try running mvn --version
hm ig it's not using that then
Is there a maven folder in the BuildTools directory?
cannot access net.minecraft.world.level.biome.Biome/org.bukkit.craftbukkit.v1_20_R4.block.CraftBiome
no
Then it's definitely using some maven install on your PC
Time to find where that is
update buildtools
^^
mhk
thanks, fixed
awesome, happy I found an actual issue 🙂 thanks for the fast af response
so, new version of spigot 1.20.5 soon?
yes, usually 5-10 minutes after fix
okay thanks
thanks for reporting
seems like this might've done the trick, thanks
also does the updated java version requirement cause backwards compatibility issues for older mc versions? I remember admins had to use a startup flag last time and update like this happened, or maybe a couple of times ago
nah, much more compatible
think it was when we came out of java 8
cool
I'm dropping pre-1.19.4 support with this one
still had nms patches going back to 1.17
oh, damn
Hey, idk where else to ask this so I'm asking here 😭
How do I make a custom trident texture? I know I need to make a new texture for the entity but I'm not sure how to do that exactly. Can anyone help me?
If you're looking to change the model, you can't, unfortunately. Entity models aren't changeable
...but for the item texture, you can use Custom Model Data/change the main texture
Best you can do is change its texture with a resource pack, but the way it looks and is shaped can't be changed without a mod
well, the error is also occuring with Spigot mappings, is it a fundamental flaw from Spigot then? x)
well, forget
Well no they definitely can be changed. I literally have a custom trident pack that I've used for like the last year
I think he was saying that you can't change ONLY the entity model (so when you launch it)
It's an itemstack when its in your hand
yeah, it gets the texture, logical
but try to change only the model on floor, it's not possible
Notice that the model doesn't match that of the item in your hotbar?
Because I'm using 2 different packs rn
That doesn't even make any sense lol
Texture in your inventory: Changeable
Texture of the model: Changeable
Model itself: Not changeable
So then you're fine
Okay, so you can only change it to one texture. There's no distinction
Because I haven't
You can change the item's texture to any texture you'd like and use CustomModelData, but the trident is rendered as a model using only one texture