I'm coding a plot menu where, when you right click with a certain item, it opens a menu, and each item in the menu is a command. The menu part is being handled by ChestCommands (plugin). However, I have it coded to give the player the item when they join, and to not let the player drop the item or move it out of their inv. But, when they click it, it keeps it in their inventory, but also gives them another one, being the one they got by clicking it. If they place it in their inventory, it basically dupes itself. This new one can't be moved, and when clicked, duplicates itself again. I want the skript to check if the clicked plot is plot 8 (the last one) and, if the item being moved is the diamond pickaxe, with the name "&5&lPlot Menu" and lore "Open the Plot Command Menu!", cancel the event.
Code so far:
on drop:
event-item is a diamond pickaxe named "&5&lPlot Menu":
line 1 of lore of event-item is "Open the Plot Command Menu!":
cancel event
on inventory click:
clicked slot is a diamond pickaxe named "&5&lPlot Menu":
line 1 of lore of clicked slot is "Open the Plot Command Menu!":
clicked slot is slot 8: (<------- spits out an error)
cancel event
Code so far:
on drop:
event-item is a diamond pickaxe named "&5&lPlot Menu":
line 1 of lore of event-item is "Open the Plot Command Menu!":
cancel event
on inventory click:
clicked slot is a diamond pickaxe named "&5&lPlot Menu":
line 1 of lore of clicked slot is "Open the Plot Command Menu!":
clicked slot is slot 8: (<------- spits out an error)
cancel event