I'm making a plugin where it does not let you have enchanted swords with sharpness. If you have a sharpness enchanted sword it will remove your sword. I made this code. Code:java @EventHandler public void onInteractEvent(PlayerInteractEvent e) { Player player = e.getPlayer(); ItemStack DA = new ItemStack(Material.DIAMOND_SWORD, 1); if (player.getInventory().contains(DA)){ if (DA.containsEnchantment(Enchantment.DAMAGE_ALL)){ player.getInventory().remove(DA); } } } Though when I try it it doesn't work. I have also tried adding sharpness into the itemstack. Doesn anybody know how to fix this?