What event are you talking about? Maybe you could try something like event.getEntity().getType(). Make sure to google the event to see what...
To offer another suggestion: You can also use Java's stream to do something for all players that don't have a certain name! Also, I would...
You could use the playerinteractevent and check if the player's hunger bar isn't full. If it's not full you know that the player is going to...
Hello, My plugin is comparing ItemStack{BLACK_STAINED_GLASS_PANE x 1, UNSPECIFIC_META:{meta-type=UNSPECIFIC, display-name=ยบ7}} against...
I think I already found the issue to this problem. To give you some more context: I was trying to manually use...
Hello, I encountered another weird issue. Consider the following code: for(String key : config.getKeys(false)){ ConfigurationSection...
Hello, I have a simple but annoying issue. My plugin can't seem to find a material with the string value "GUNPOWDER". I'm using the...
You could try to use the YamlConfiguration. It's very easy to use and there are many tutorials for it. But like timtower said, it might not be a...
I also made a nice command handler, you can see how it works in the test folder. Jasper's command handler also looks nice, but I just want to give...
My config files that I want to use will contain info about GUI items, and I'd like to make sure that these files work in all versions so I can...
Hello coders, I'm struggeling with the change of type names of the materials in the Spigot and Bukkit API. Does anyone have a map of all the...
Opening an actual crafting table programatically is really complicated. That's why I'd suggest to maybe stick with a resource pack in your...
Oh ok I think I'll just do that. Thanks.
This is what I'd do: 1) Make a class that saves data of the mined blocks: class MinedBlock{ LocalDateTime minedAt; Material blockType; } 2)...
Hello, On the bukkit forum (dev.bukkit.org) I'd like to post my plugin that has multiple versions that each support other game versions. The...
No I haven't solved it yet sorry. Verstuurd vanaf mijn COL-L29 met Tapatalk
What the problem with that is is that comments and spacing get removed when using saveConfig(). But that approach could probably work and I'll...
I dont want do do that for every update where the default config gets changed. Ill try to look for a solution thats generic. Verstuurd vanaf...
Hi programmers, I'm currently struggeling with figuring out why saveDefaultConfig() won't actually save new configuration attributes. The...
Hi. I think you should use more private functions that handle only one function of your bigger function. Also, using static variables in a main...
Separate names with a comma.