-
Notifications
You must be signed in to change notification settings - Fork 12
3.1 Item
The value of this option should describe the item in the slot.
PlaceholderAPI, if available, will be applied to the configuration, and different items with different names, lores, etc. will be shown to different players.
For example: Hello %player_name%
will be translated to Hello Notch
if the name of the player is Notch.
An item has several attributes, and several frequently used attributes are listed below.
The count of items in the slot, needed to be explicitly declared in the configuration. In most cases it is 1.
The type of the item in the slot, needed to be explicitly declared in the configuration.
The item meta of the item in the slot, needed to be explicitly declared in the configuration. Usually it is 0.
The NBT of the item. For example, the section shown below represents a skull head which represents the player who opens the inventory:
Item {
Count = 1
ItemType = "minecraft:skull"
UnsafeDamage = 3
UnsafeData = {
SkullOwner = "%player_name%"
}
}
The custom name of the item. Formatting codes are available.
The list of custom tips of the item (usually called item lore). Formatting codes are available.
The enchantment list of the item. For example:
ItemEnchantments = [
"minecraft:protection:4"
"minecraft:fire_protection:4"
"minecraft:feather_falling:4"
"minecraft:blast_protection:4"
"minecraft:projectile_protection:4"
]
It has all the protection enchantments, and all the levels are 4 (full level).
Whether the item shows its enchantments or not, could be either true
or false
.
Whether the item (usually tools) shows its attributes or not, could be either true
or false
.
What the represented player is if the target item is a skull head. The value of this attribute should be an object (also called a section). A UUID
is required, while a Name
could be optional. For example:
RepresentedPlayer = {
UUID = "%player_uuid%"
}
It will show the player's own skull head. Here is another example for a specific player:
RepresentedPlayer = {
UUID = "61699b2e-d327-4a01-9f1e-0ea8c3f06bc6"
Name = "Dinnerbone"
}