Item Format

ReActions uses a special item format to describe items. You can create new items, compare and store items as variables.

[BasicItem] [Enchantment] [Name] [Lore] [Parameters] [Regex]

Parameters

ElementPossible valuesDescription
[BasicItem]type:<Type> [data:<Data>] [amount:<Amount>]
item:<Type>[:<Data>][*<Amount>]
Define basic item information: type, data (durability) and amount.
Type is a name of material defined in BukkitAPI, you can also use numeric type id (i.e. type:1 instead of type:STONE).
Examples:
type:STONE amount:64
type:MAP data:12 amount:10
type:IRON_SWORD
item:DIAMOND*64
[Enchantment]enchantments:<Enchantment1>[:<Level>][;<Enchantment2>[:<Level>]]Define list of enchantments of item.
Supported enchantment type: PROTECTION_ENVIRONMENTAL, PROTECTION_FIRE, PROTECTION_FALL, PROTECTION_EXPLOSIONS, PROTECTION_PROJECTILE, OXYGEN, WATER_WORKER, THORNS, DAMAGE_ALL, DAMAGE_UNDEAD, DAMAGE_ARTHROPODS, KNOCKBACK, FIRE_ASPECT, LOOT_BONUS_MOBS, DIG_SPEED, SILK_TOUCH, DURABILITY, LOOT_BONUS_BLOCKS, ARROW_DAMAGE, ARROW_KNOCKBACK, ARROW_FIRE, ARROW_INFINITE, LUCK, LURE
Example:
type:IRON_SWORD enchantments:KNOCKBACK:2;SHARPNESS:5
[Name]name:<Name>Define item's name.
Example:
type:IRON_SWORD name:{&4Sword of Power} enchantments:KNOCKBACK:2;SHARPNESS:5
[Lore]lore:<Lore>Defines item's lore. Use "\n" as line separator.
Example:
type:IRON_SWORD name:{&4Sword of Power} enchantments:KNOCKBACK:2;SHARPNESS:5 lore:{&6This sword contains\nmagic power}
[Parameters]book-author:<AuthorName> book-title:<TitleOfTheBook> book-pages:<Pages>Define book data. This parameters is applicable to book items only.
Book pages data represented in single line with "\n" as page separator and "&z" as line separator.
Example:
type:WRITTEN_BOOK book-title:{The book of Test} amount:1 data:0 book-pages:Line1&z&0Line2&z&z&0Line4&z&z&z&0Line7&z&z&z&z&z&z&z&0LineX\nPage2Line1&z&0Page2Line2&z&z&z&0Page2Line5\nPage3Line1 book-author:fromgate
firework-power:<Power> firework-effects:<FireworkEffects>Define firework parameters.
<Power> — firework's power value (flying duration)
<FireworkEffects> — list of firework effects: type:<Type1> flicker:<true/false> trail:<true/false> colors:{color1,color2} fade-colors:{color1,color2};type:<Type2> flicker:<true/false> trail:<true/false> colors:{color1,color2} fade-colors:{color1,color2}
Example:
type:FIREWORK amount:1 firework-power:5 firework-effects:{type:BALL flicker:false trail:false colors:81,48,26;type:BALL flicker:false trail:false colors:59,81,26}
color:<color>Defines color of leather armor and color of some material types: WOOL, STAINED_GLASS, STAINED_CLAY, STAINED_GLASS_PANE, INK_SACK.
Color value could defined in RGB format (R,G,B) or by color name (BLACK, BLUE, BROWN, CYAN, GRAY, GREEN, LIGHT_BLUE, LIME, MAGENTA, ORANGE, PINK, PURPLE, RED, SILVER,WHITE, YELLOW).
For all material except leather armor items, it's recommended to use color name instead of RGB-format.
Example:
type:LEATHER_HELMET amount:1 color:YELLOW
skull-owner:<PlayerName>Defines skull owner for skull item (don't forget to set skull item data to 3)
Example:type:SKULL_ITEM amount:1 data:3 skull-owner:fromgate
potion-effects:<PotionEffects>Defines list of potion effects contained in potion bottle.
<PotionEffects> defined as list:
<PotionType1>:<PotionPower1>:<PotionDuration1>[;<PotionType2>:<PotionPower2>:<PotionDuration2;...;<PotionTypeN>:<PotionPowerN>:<PotionDurationN>]

Supported potion types: SPEED, SLOW, FAST_DIGGING, SLOW_DIGGING, INCREASE_DAMAGE, HEAL, HARM, JUMP, CONFUSION, REGENERATION, DAMAGE_RESISTANCE, FIRE_RESISTANCE, WATER_BREATHING, INVISIBILITY, BLINDNESS, NIGHT_VISION, HUNGER, WEAKNESS, POISON, WITHER, HEALTH_BOOST, ABSORPTION, SATURATION
PotionDuration defines potion time duration using Time format
Example:
type:POTION amount:1 data:0 potion-effects:SPEED:3:10m;JUMP:2:10m name:{&6Ultra fast potion}
map-scale:<true/false>Defines the scale mode for MAP item.
stored-enchants:<Enchants>Defines enchants list of enchanted book.
Supported enchantment type: PROTECTION_ENVIRONMENTAL, PROTECTION_FIRE, PROTECTION_FALL, PROTECTION_EXPLOSIONS, PROTECTION_PROJECTILE, OXYGEN, WATER_WORKER, THORNS, DAMAGE_ALL, DAMAGE_UNDEAD, DAMAGE_ARTHROPODS, KNOCKBACK, FIRE_ASPECT, LOOT_BONUS_MOBS, DIG_SPEED, SILK_TOUCH, DURABILITY, LOOT_BONUS_BLOCKS, ARROW_DAMAGE, ARROW_KNOCKBACK, ARROW_FIRE, ARROW_INFINITE, LUCK, LURE

Example:
type:ENCHANTED_BOOK amount:1 stored-enchants:DIG_SPEED:2;DURABILITY:5
firework-effect:<FireworkEffects>Defines firework effects for Firework charge item.
<FireworkEffects> — list of firework effects: type:<Type1> flicker:<true/false> trail:<true/false> colors:{color1,color2} fade-colors:{color1,color2};type:<Type2> flicker:<true/false> trail:<true/false> colors:{color1,color2} fade-colors:{color1,color2}

Example:
type:FIREWORK_CHARGE amount:1 firework-effect:{type:CREEPER flicker:false trail:false colors:195,84,205}
color:<Color> pattern:<PatternData>Defines banner colors and patterns. Works only in version 1.8 and newer.
<PatternData> is a list of pattern type with colors (pattern and color are divided with ":"):
<Pattern1>:<Color1>;<Pattern2>:<Color2>;...;<PatternN>:<ColorN>

Supported pattern types: BASE, BORDER, BRICKS, CIRCLE_MIDDLE, CREEPER, CROSS, CURLY_BORDER, DIAGONAL_LEFT, DIAGONAL_LEFT_MIRROR, DIAGONAL_RIGHT, DIAGONAL_RIGHT_MIRROR, FLOWER, GRADIENT, GRADIENT_UP, HALF_HORIZONTAL, HALF_HORIZONTAL_MIRROR, HALF_VERTICAL, HALF_VERTICAL_MIRROR, MOJANG, RHOMBUS_MIDDLE, SKULL, SQUARE_BOTTOM_LEFT, SQUARE_BOTTOM_RIGHT, SQUARE_TOP_LEFT, SQUARE_TOP_RIGHT, STRAIGHT_CROSS, STRIPE_BOTTOM, STRIPE_CENTER, STRIPE_DOWNLEFT, STRIPE_DOWNRIGHT, STRIPE_LEFT, STRIPE_MIDDLE, STRIPE_RIGHT, STRIPE_SMALL, STRIPE_TOP, TRIANGLE_BOTTOM, TRIANGLE_TOP, TRIANGLES_BOTTOM, TRIANGLES_TOP
Supported colors: BLACK, BLUE, BROWN, CYAN, GRAY, GREEN, LIGHT_BLUE, LIME, MAGENTA, ORANGE, PINK, PURPLE, RED, SILVER, WHITE, YELLOW. You can also use RGB-format but nearest color will set instead.

Example:
type:BANNER amount:1 data:13 color:MAGENTA patterns:TRIANGLES_TOP:YELLOW;TRIANGLES_BOTTOM:ORANGE;SKULL:RED
[Regex]regex:<true/false>This is unnecessary parameter.
Used only if you going to compare or remove item using regex or exact compare.

Compare items

Item comparing used in item compare flags and item remove actions. This flags and actions allows to compare items using regular expressions. Only few fields could be used to compare items: type, data, amount, name and lore. If you skipped and field (name for example) any value of field will match. You can disable using the regular expression by adding parameter "regex:false" to item format.

Example

Player holds item in hand - Iron sword named "Power sword" with lore "This is the great sword of Power".

Here is example of ITEM flags that will match this item:

  • ITEM "type:IRON_SWORD name:{Power sword} lore:{This is the great sword of Power}
  • ITEM "type:IRON_SWORD name:{Power .*}
  • ITEM "type:IRON_SWORD
  • ITEM "type:IRON_SWORD lore:{.*sword.*Power}

If your item lore contains several line, all line will compared separately.

Example

You need to remove "special boots" from inventory. IRON_BOOTS with lore contained three lines: 1: "Boots of speed", 2: "This excellent boots", "3: created using nanotechnology" Here is action that will remove this item:

ITEM_REMOVE_INVENTORY type:IRON_BOOTS lore:{Boots.*\n.*\n.*nanotech.*}

Items Set

Items set format used in some actions, that allows to create item set of items and randomly fill this set.

set1:{item1:<Item> item2:<Item> item3:<Item> chance:<Chance>} set1:{item2:<Item> item2:<Item> item3:<Item> chance:<Chance>}...

  • <Item> — item definition
  • <Chance> — chance of selecting this item set (in percents)

Example:

set1:{item1:IRON_SWORD item2:DIAMOND_SWORD chance:5} set2:{item1:{type:DIRT amount:200} chance:95}

Actions that supports item sets: