Search results

  1. I

    Speed/Efficiency PersistentDataContainer vs Class in HashMap

    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...
  2. I

    e.setCancelled should return the actual cancel status

    Supposing that we want to exit from a cancelled event function by us, we need to do: e.setCancelled(true); if(e.isCancelled()) return; Being that we could do: if(e.setCancelled(true)) return; This case gets more sense with a true comparison case: ItemStack theResult =...
  3. I

    Question How apply a temporary custom effect to player?

    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...
  4. I

    Solved How can i add a Custom Enchantment?

    Well... that, i wanna add a custom enchant to my server... i tried: Enchantment.registerEnchantment(); But this doesn't works. So... which is the correct way to implement my own Enchantments?