The cuestion is simple, what is better?
Supposing we want to store useful data (Location, Homes, Money, Titles) of a player and request it when PlayerMoveEvent is called. Please considerate an high amount of player for each case.
Case A: Create a class what will store the custom player data...
I get you and i am good with the implementation of the util methods.
I just wanna highlight the concept of code reduction. Within the API exists a lot of functions with void returns which hinder us at the time of programming. A clear example of this whould be the "getItem" and "setItem" of the...
This kind of little modifications has its purpose: write less, more usefull and beauty code. The structure of an api or framework should be as worked as its programming.
Suppose this: We want to disable or enable a buttom from a window. How we would write the code? Should we create a function...
This could be implemented with a new function just for Paper called "cancelled([status])" or something like that.
return; // Never will be.
Supposing that we want to exit from a cancelled event function by us, we need to do:
Being that we could do:
This case gets more sense with a true comparison case:
ItemStack theResult =...
You could use https://papermc.io/javadocs/paper/1.18/org/bukkit/event/player/PlayerMoveEvent.html to get the player movement and verify the player with https://papermc.io/javadocs/paper/1.18/org/bukkit/entity/Entity.html#isInWater() to check if it's in water.
Or you could just use...
First all, you have a excesive amount of plugins on your server... incluiding some same plugins with diferent versions. You should free your server a little bit.
About the all IllegalArgumentException: Obiously the API changed and the previous heads are nonexistent. The next reply is the...
¡The inclusion of MiniMessage is a great new! I was waiting for this. Also, a new documentation page for the PaperMC API doc. will be incredible. And much more if would allow comments and code examples by the comunity.
Also, thanks for this forum. The style is amazing and beautiful.
Well, i did my own implementations of enchantments and it works very very well, but the problem now is the following:
I created an enchantment that increase your movement speed till 100%. And now i need a counter enchantment that will temporary reduce the victim's movement speed when him...