Hi there, I'm in the process of updating a very old plugin of mine. I haven't programmed for a long time and now I have an error and can't get any further. for whatever reason i get an error in line 75. Wasn't that how it used to be? How should the line be correct?
@cha0s What are you trying to do here? Also, for newer Minecraft versions, getItemInHand is deprecated since the player can have a main hand and an offhand now.
@CraftCreeper6 it should be read back which object the player has in hand. This should be compared to the list of locked items
@cha0s getTypeId() doesn't exist anymore, that's back in 1.8 We now use Materials to compare items, so you want to update your block list to include Materials rather than item IDs, and compare it with event#getClickedBlock()#getType()
Thanks. error is gone. How can i update from IDs to Materials? Ingame the plugin only found old items. If i try to use newer items like a pig iron block - plugin says: no block names pig iron block here is the ID-List