Minecraft plug in Java?

fi
3

How do you make an if query for an item display name?

So who the display name of the item "test" is, should this and that happen?

And I would also like to know how you can lure the Durabilitity to a certain state, eg Item xy Holtz sword should only have 40 of 59 and not go down, so it just stays at 40 :?

Minecraft version 1.8-1.8.9

Le

Since you are apparently still at the very beginning, I recommend you to watch detailed tutorials on YouTube. If you ask for everything, you will not be able to move forward because it takes a long time and you will not take much with you.

st

ItemStack i =…;
ItemMeta i'm = i.getItemMeta ();
if (i'm.getDisplayName ()! = null) {
if (i'm.getDisplayName (). EqualsIgnore ("test")) {

fi

Thank you 👍