Skip to content
JasperLorelai edited this page May 19, 2024 · 5 revisions

Configuration:

  • Note that it's usually ideal to reference a predefined Magic Item instead.
  • The item data is optional, meaning it is sufficient to just specify the item type instead.
  • This format follows JSON in string form: 'itemType{itemData, itemData, ...}'.
  • Instead of that format you can also extend existing predefined magic items (e.g. magicItem) with magicItem{itemData, itemData, ...}.
Data Description Type Example
name Display name of the item. Formatted Text stone_sword{name:"God Sword"}
amount Amount of the item. Integer stone_sword{amount:2}
durability Durability of the item. Integer stone_sword{durability:10}
repair-cost Repair penalty Integer stone_sword{repair_cost:10}
custom-model-data Custom model data of the item. Integer stone_sword{customModelData:20}
power Sets the approximate power of the firework. Each level of power is half a second of flight time. It should be [0, 127]. Integer firework_rocket{power:1}
firework-effect Follows strict format: fireworkType hasTrail hasFlicker colors fadeColors. fireworkType must be one of these. hasTrail & hasFlicker must be either true or false. colors must be hex colors (without the # character), and you can list multiple separated by ,. fadeColors follows the same format as colors, but it is optional unlike all other options. String firework_rocket{firework_effect:"ball true true ff0000,ffffff,0000ff"}
firework-effects Same as above, but in list form. String list firework_rocket{firework_effects:["ball true true ff0000,ffffff,0000ff", "ball true true 000000"]}
unbreakable Make the item unbreakable. Boolean stone_sword{unbreakable:true}
hide-tooltip Hide item tooltip. Boolean stone_sword{hide_tooltip:true}
color Hex color of the item. String leather_boots{color:#214365}
potion-data Before 4.0 Beta 14. Potion type of the item. It may be followed up by extended or upgraded keywords. String potion{potion-data:mundane}, potion{potion-data:"fire_resistance upgraded"}
potion-type Since 4.0 Beta 14. Potion type String potion{potion-type:mundane}
potion-effects A list of potion effects following the format: type strength duration ambient particles icon. Aside from type, all options are optional. duration should be in server ticks. ambient, particles, and icon must either be that word, true or, false. String list potion{potion-effects:["speed 1 600"]}
skull-owner Player username of a skull (player_head). This (or uuid) and texture are required for the skull to be generated. String
uuid UUID of the skull owner - used instead of skull-owner username. String
texture You can find this and signature from a player's username using this tool. String
signature Look above String
title Title of the item. Before 4.0 Beta 14: String
Since 4.0 Beta 14: Formatted Text
written_book{title:"Interesting Book"}
author Author of the item. Before 4.0 Beta 14: String
Since 4.0 Beta 14: Formatted Text
written_book{author:"God"}
pages A list of strings representing the pages of the book. Line breaks can be represented with \n, <br>, or <newline>. Formatted Text List written_book{pages=["Page 1:\n\nparagraph 1<br><br>paragraph 2<br><br>paragraph 3", "Page 2"]}
enchants Enchants of the item. A list of enchantments can be found here. enchantName: enchantLevel stone_sword{enchants:{ fire_aspect:1, smite:2, sharpness:3 }}
fake-glint Applies a fake enchantment glint to the item if it has no enchantments. Boolean stone_sword{fake-glint:true}
attributes A list of strings representing attribute modification. String list
lore Lore of the item. Formatted Text List stone_sword{lore:["&aVery Strong", "&bStrong", Sword]}
patterns A list of strings representing banner patterns. Format: <banner pattern> <dye color>. Click here for valid banner patterns, and here for valid dye colors. Shorthand banner pattern identifiers are also supported, as listed here, under the section "Code". String list
ignored-attributes Documented here. String list
blacklisted-attributes Documented here. String list
block-data Block States key-value pairs, stored in square brackets list. String stone_sword{block-data: [state_1=value, state_2=value, ...]}
strict-enchants Since 4.0 Beta 13. True by default. When false, enchantments other than those specified on the magic item no longer cause the match to fail. Boolean
strict-enchant-level Since 4.0 Beta 13. True by default. With false, items being matched require at least the level of enchantments specified on the magic item, rather than the exact level. Boolean
strict-durability Since 4.0 Beta 13. True by default. When false, the magic item requires at least the specified durability, instead of the same amount. Boolean
strict-block-data Since 4.0 Beta 13. True by default. When false, the magic item uses BlockData#matches instead of strict equality. Boolean

Full Example:

item-option: 'diamond_sword{name:"&aGod Sword", amount:3, enchants:{ fire_aspect:1, smite:2, sharpness:3 }, lore:[Very, Strong, Sword]}'
Clone this wiki locally