Spigoot Jak tworzyć niestandardowe elementy

 //You can create custom items in minecraft by:
ItemStack item = new ItemStack(Material.MATERIAL_NAME); //You are creating an itemstack with specified material.
ItemMeta meta = item.getItemMeta(); //You are getting the meta of the item.
meta.setDisplayName("Patrick"); //You are setting the display name of the item.
meta.addEnchant(Enchantment.DURABILITY, 3, true); //3 is the level of enchantment, and the true is setting if the enchantment level can be higher than the normal limit.
meta.addItemFlag(ItemFlags.HIDE_ENCHANTS); //This method allows you to hide some properties that shows up when you get on these.
item.setItemMeta(meta); //And the end of the process, you have to set the item's meta by this method.
 //If you want to see some more methods, you can use some IDE's or check out this website: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/meta/ItemMeta.html
 //I hope it will help you guys <3
Brave Beetle