Additional Resources
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!
Time Format
In many places in BattleArena, a duration is specified a configuration option. Time durations are abbreviated and multiple can be chained together.
Duration Abbreviations
- y: Years
- M (uppercase): Months
- w: Weeks
- d: Days
- h: Hours
- m (lowercase): Minutes
- s: Seconds
Examples
phases:
countdown:
...
countdown-time: 1m30s # 1 minute 30 seconds
victory:
...
duration: 5s # 5 seconds
Potion Effect Format
BattleArena has an potion effect format that is used for in both creating items and applying effects to players.
Effect Options
Name |
Description |
Type |
duration |
The amount of time (in ticks) to apply the effect for. |
<number> |
amplifier |
How strong the effect is. |
<number> |
ambient |
Whether the effect is ambient (less intrusive) |
[true|false] (default: false) |
particles |
Whether the effect should show particles or not. |
[true|false] (default: true) |
Examples
events:
on-start:
- give-effects{effects=[speed{duration=300;amplifier=1},jump_boost{duration=300;amplifier=2}]}
...
events:
on-respawn:
- give-item{item=splash_potion{effects=[speed{duration=300;amplifier=1}]}}