Item#getEnchantments() to get all enchantments or Item#getEnchantment(enchantment id) which returns certain Enchantment or null if item doesn't have that enchantment. Idk why would you check the enchantments every time player moves but there is PlayerMoveEvent that you could use.
On player move event if getEnchantment for protection isn't null check its level and decrease itI mean, if a player has the PROTECTION 4 enchant, he changes it to PROTECTION 3 after moving. Do you have any idea?
Would you write this to me?On player move event if getEnchantment for protection isn't null check its level and decrease it
why?Would you write this to me?
You can see the javadoc here: https://ci.nukkitx.com/job/NukkitX/job/Nukkit/job/master/javadoc/index.html?overview-summary.htmlI can't quite api nukkit :/
Because you won't learn if you don't practiceSo you wouldn't help me write this?