copy Copy chevron-down
π΄ Old ConfigurationsItems This page is valid for all plugins using the template developed by maxlego08 and using the loader system for itemstacks.
Here is an example of an item in a yml file:
Copy item :
material : 3
data : 0
durability : 0
amount : 1
glow : true
lore :
- " line "
- " &cred line "
- " &fwhite line "
name : " &eMy awesome name "
enchants :
- PROTECTION_ENVIRONMENTAL,4
flags :
- HIDE_ENCHANTS Example player head:
Add player HEAD
You have to add HEAD in the item name to be able to display the head of the player who opened the GUI.
Example:
If you are below version 1.13 you have to do
Now let's move on to the explanation of each element
You can put the item ID for versions lower than 1.13 and you can put the material name for higher versions. List of materials: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.htmlarrow-up-right
The item data works only for versions lower than 1.13, the default value is 0.
The number of items (from 1 to 64), the default value is 1.
Allows you to change the durability of items, works only for armor and other items that use durability, the default value is 0.
Allows you to change the name of the item, by default the name is null.
Allows to add an enchantment to the item and to add the HIDE_ENCHANTS flag
Allows to change a lore of the item, by default the lore is null.
Allows you to add enchantments, you have to put the name of the enchantment then the level of the enchantment, like this: ENCHANT,ENCHANT_LEVEL List of enchantments available: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.htmlarrow-up-right
This option is available for servers greater than or equal to the 1.8. List of flags: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/ItemFlag.htmlarrow-up-right
Allows you to put a custom model data on an item
Developer - Loading and saving an itemtack
To save and load an item you will have to use the ItemStackLoaderarrow-up-right class