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}]}}
Custom Effect Format
BattleArena has support for custom effects in a few places that are primarily cosmetic.
Particle
Name |
Description |
Type |
particle |
The name of the particle. See Particle. |
<Particle> |
speed |
The speed of the particle. |
<number> |
count |
The number of particles to display. |
<number> |
offset |
The offset of the particle. |
Position: <x,y,z> |
data |
The data for the particle. |
Will vary for each particle (i.e. item_crack will use Item) |
Firework
Name |
Description |
Type |
firework-type |
The type of firework to display. See FireworkEffect.Type. |
<FireworkEffect.Type> |
flicker |
Whether the firework should flicker. |
<true|false> |
trail |
Whether the firework should have a trail. |
<true|false> |
colors |
The colors of the firework. |
Color list: - [#<hex>...] |
fade-colors |
The colors the firework should fade to. |
Color list: - [#<hex>...] |
Freeze
Name |
Description |
Type |
duration |
How long to freeze the player for. See Time Format. |
<Duration> |
radius |
In what radius players should be frozen for, if applicable. |
<number> |
Single-line Format
This is the most common use of effects in BattleArena, and follows a very similar format to that seen in the Action Reference. Note that options are separated using the semicolon (;).
Examples:
effects:
- particle{particle=flame;speed=0.01;count=15;offset=0.3,0.7,0.3}
- freeze{duration=5s}
Configuration Node Format
While less common, this format may be seen to represent effects as well. Rather than the effect properties existing on a single line, they are defined over a configuration node. Here is an example of how that may look:
my-effect:
firework-type: ball
flicker: true
trail: false
colors:
- "#fcba03"
- "#fcba03"
fade-colors:
- "#878378"