Item Mods
The item mods module allows modification of all items present on a map or created during the match. This can be used, for example, to make all gold swords unbreakable or give all items of a specific type a custom name.
Item-Mod Element
Element | Description |
---|---|
<item-mods> </item-mods> | The item mods node, containing all the individual modification rules. |
Sub-elements | Value/Children | |
---|---|---|
<rule> </rule> | A single item modification rule. | Rule Sub-Elements |
Rule Sub-Elements
Element | Description | Value/Children |
---|---|---|
<match> </match> | RequiredUniqueThe material or materials to modify. | Match Sub-Elements |
<modify> </modify> | RequiredUniqueThe attributes to modify on the specified material(s). | Item Meta |
Match Sub-Elements
Element | Description | Value/Children |
---|---|---|
<material> </material> | An individual material to match. | Single Material Pattern |
<all-materials/> | Match all materials. | |
<all-blocks/> | Match all block type materials. |
Examples
<item-mods>
<rule>
<match>
<material>iron sword</material>
</match>
<modify unbreakable="true">
<enchantment>knockback</enchantment>
</modify>
</rule>
</item-mods>
<item-mods>
<rule>
<match>
<material>bow</material>
</match>
<modify show-enchantments="false" unbreakable="true">
<enchantment level="2">infinity</enchantment>
</modify>
</rule>
</item-mods>
Item Meta
The following attributes and sub-elements can be used with the <modify>
element to modify an item or block.
While these are the same attributes as used in item kits, the modify element does not currently support the projectile or grenade attributes.
Modify Sub-Elements
Element | Description | Value |
---|---|---|
<enchantment> </enchantment> | This item's enchantments. | Enchantments |
<effect> </effect> | A custom potion effect, only applies for potion items. | Potion Effect |
<attribute> </attribute> | Custom attributes for this item. | Attribute Modifiers |
<can-destroy> </can-destroy> | The materials that can be mined with the item. | Can Destroy |
<can-place-on> </can-place-on> | The materials that the item can be placed on. | Can Place On |
Modify Attributes
Attribute | Description | Value | Default |
---|---|---|---|
name | The item's display name that appears when it is selected. | String | |
lore | Custom text that appears when a player hovers over the item in the inventory. | String | |
unbreakable | Specify if this item is unbreakable and hides the durability bar in Minecraft. | true/false | false |
color | Leather armor color as a hexadecimal color. RRGGBB Only applies to leather armor items. | Hex Color | |
potion | Potion type. Only applies to potion items. | Potion ID | |
show-enchantments | Show enchantments in the item tooltip. | true/false | true |
show-attributes | Show attribute modifiers in the item tooltip. | true/false | true |
show-unbreakable | Show the unbreakable property in the item tooltip. | true/false | true |
show-can-destroy | Show the breakable block list in the item tooltip. | true/false | true |
show-can-place-on | Show the blocks the item can be placed on in the item tooltip. | true/false | true |
show-other | Show various other things in the item tooltip. | true/false | true |