Minecraft plugin programming CardFillEvent? Is there such a thing? Because I want to make a plugin which, when you fill out a card, writes a text into the cart with "Card maker: …" Many thanks in advance! By the way, the whole thing is for 1.16.3
As a workaround, you can simply take the right click event and test whether the card has already been filled out with the help of metadata or sub-IDs.
It is best to use the PlayerInteractEvent and test whether the player right-clicks and has a card in hand.
Use the PlayerInteractEvent
In it, ask whether it was right-click with an empty card
If so: Check a tick later (Bukkit.getScheduler (). RunTaskLater…) whether the player is now holding a filled card
If yes → no lore available? → Attach the cart with the user name from the event.
PS: A map that shows landscapes is called "Map" in English, not "Card". It is the same in Spigot (Material.MAP and Material.EMPTY_MAP).
Thanks but I have a problem: whenever I try to set the lore of this item, a fat NullPointerException comes up
You must first request the item in the runnable from the player again, as the item from the event is no longer valid.