Program Minecraft if anvil does not collect any items openly?

br
- in Plugins
2

I'm currently programming a plugin that can't fix diamond picks (code: https://hastebin.com/...hecoga.cs), but players can drop the pickaxe, open the anvil, and then pick up the pickaxe again.

Ul

InteractEvent:

1. (event.getClickedBlock (). GetType (). Equals (Material.ANVIL)) && (event.getAction (). Equals (Action.RIGHT_CLICK_BLOCK)) &&
(player.getInventory (). Contains (new ItemStack (Material.DIAMOND_PICKAXE &&
You do not finish the query. If () {… The last two && are therefore meaningless, or if the query is not terminated and ends with && {} an error message will appear
2. You ask the eventaction two times from what is unnecessary, once is enough.