Item Syntax
BattleArena has an item format that is used for creating items in config. A few examples of where this format is used is in the Classes module, as well as for the Give Item Action, among other places.
Item Options
Name |
Description |
Type |
color |
The color of the item, mainly for leather armor, banners, etc. |
Color: - #<hex> or <rrr,ggg,bbb> |
custom-model-data |
The custom model data to use. |
<number> |
damage |
How much damage (or durability) should be applied to the item. |
<number> |
display-name |
The display name of the item (supports MiniMessage). |
<string> |
enchants |
Enchants to put on the item. |
Enchantment list: - [<enchant name>:<amount>...] |
item-flags |
The item flags to apply. See ItemFlag. |
Item Flag list: -[<item flag name>...] |
lore |
The lore of the item (supports MiniMessage). |
Lore list: [<line>...] |
amount |
How amount of the item. |
<number> |
unbreakable |
Whether the item is unbreakable. |
<true|false> |
effects |
The potion effects to apply to the item. |
Potion effect list: - [<potion effect>...] |
Single-line Format
This is the most common use of items in BattleArena, and follows a very similar format to that seen in the Action Reference. Note that options are separated using the semicolon (;).
Examples:
items:
- stone{amount=32}
- bow{unbreakable=true}
- arrow{amount=64}
- diamond_sword{display-name=<yellow>Mob Slayer;lore=[Kills every mob in it''s way!];enchantments=[sharpness:10]}
Configuration Node Format
While less common, this format may be seen to represent items as well. Rather than the item properties existing on a single line, they are defined over a configuration node. Here is an example of how that may look:
my-item:
item: golden_apple
amount: 32
display-name: Yummy Apple
lore:
- Legends say this apple is delicious!
- Try it for yourself!