Create your items
Creating an item is very straightforward.
Actually create the item
To create the item, you have to provide an ID that will allow the plugin to see the difference between it and another item.
Give the item its ItemStack
If you are familiar with the Spigot API, you are obviously familiar with the ItemStack class. Here, you have to provide an ItemStack that the AbilityItem will represent. Here is how:
Lock the item
There are two ways to lock an item.
Lock it completely in the slot it is in (cannot be removed unless death or /clear)
Stop it from being dropped
Set the quantity
Even though you can set the quantity in the ItemStack, you can also set it using
Set what happens on interact
If you have dealt with Spigot event, you should know the PlayerInteractEvent one (if not, here's the javadocs link). Here you can completely set what will happen when the item is clicked on. Here:
When a player clicks on the item, they will receive the message You clicked da stick...
Finally, build it up
When you are done making the item, you have to build it using:
Straight configuration
You can also make configurating an item more compact, like this:
Give the item
You then have a very simple way to give the item:
Last updated