Actions

When player accomplishes the conditions, you can execute a diverse list of actions. You can also use variables in the actions list.

Message

Sends a message to the player.

message: &aGreat %player%! You''ve just received $5000!

Centered Message

Sends a centered message to the player.

centered_message: &c&lWELCOME TO THE SERVER

Console Message

Sends a message to the console.

console_message: %player_name% left the server with IP %player_ip%

JSON Message

Sends a JSON message to the player. These messages allows you to add click and hover events. You can generate JSON messages on this link: https://minecraft.tools/en/json_text.php

json_message: {"text":"Welcome to the server","underlined":true,"color":"red"}

Console Command

Executes a command from the console.

console_command: eco give %player% 5000

Player Command

Executes a command from the player.

player_command: warp survival

Player Command as Op

Executes a command from the player as OP. (Not recommended)

player_command_as_op: help

Player Send Chat

Sends a message in chat from the player. You can even execute a command that is not registered.

player_send_chat: &2Hello
player_send_chat: /rewards

Teleport

Teleports the player. Use this format: "teleport: world;x;y;z;yaw;pitch"

teleport: lobby;0;60;0;90;0

Give Potion Effect

Give a potion effect to the player. Use this format: "give_potion_effect: effect;duration_in_ticks;level;show_particles" You can find a list of potion effects here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html

give_potion_effect: POISON;120;1;false

Remove Potion Effect

Removes a potion effect from the player.

remove_potion_effect: POISON

Cancel Event

Whether event should be cancelled or not. Use this format: "cancel_event: true/false"

cancel_event: true

Kick

Kicks the players from the server.

kick: &cWhat are you trying to do?

Play Sound

Plays a sound to the player. Use this format: "playsound: sound;volume;pitch;(optional, location)<x>,<y>,<z>,<world>" You can find a list of sounds here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html Use this list instead when using 1.8: https://helpch.at/docs/1.8.8/index.html?org/bukkit/Sound.html

playsound: BLOCK_NOTE_BLOCK_PLING;10;0.1

# Playsound on location
playsound: BLOCK_NOTE_BLOCK_PLING;10;2;100,60,-127,world

Play Sound Resource Pack

Plays a resource pack sound to the player. The format is the same as playsound action.

playsound_resource_pack: my_custom_sound;10;1

# Playsound on location
playsound_resource_pack: my_custom_sound;10;2;100,60,-127,world

Stop Sound

Stops a sound for a player. Use stopsound: <sound> for specific sound. Only works on 1.10+. Use stopsound: all for stopping all sounds. Only works on 1.17+. You can find a list of sounds here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html

stopsound: BLOCK_NOTE_BLOCK_PLING
stopsound: all

Gamemode

Sets a gamemode for the player. Possible gamemodes: CREATIVE, SURVIVAL, ADVENTURE, SPECTATOR

gamemode: CREATIVE

Send to Server

Sends the player to a bungee server.

send_to_server: lobby

Actionbar

Sends an actionbar message to the player. Use this format: "actionbar: message;duration" (The duration must be in ticks, 20ticks = 1second) On repetitive events, use a time of 0 for no flickering.

actionbar: &6Welcome to the server;120

Title

Sends a title and subtitle message to the player. Use this format: "title: fadeIn;stay;fadeOut;title;subtitle" (The duration of fadeIn, stay and fadeOut must be in ticks, 20ticks = 1second) If you want just a title, or just subtitle write "none"

title: 20;40;20;&6This is a title;none

Damage

Damages the player a specific amount.

damage: 5

Set On Fire

Sets the player on fire for a certain duration in ticks. (20ticks = 1 second)

set_on_fire: 60

Freeze

Freezes the player for a certain duration in ticks. (20ticks = 1 seconds). Only works on 1.17+.

freeze: 300

Heal

Heals the player a specific amount.

heal: 5

Close Inventory

Closes the player opened inventory.

close_inventory

Clear Inventory

Clears the player inventory.

clear_inventory

Wait

Waits X amount of seconds before executing more actions.

 - 'message: &a3'
 - 'wait: 1'
 - 'message: &a2'
 - 'wait: 1'
 - 'message: &a1'
 - 'wait: 1'
 - 'message: &aGo!'

Wait Ticks

Waits X amount of ticks before executing more actions. (20ticks = 1 second)

 - 'message: &a3'
 - 'wait_ticks: 20'
 - 'message: &a2'

Remove Item

Removes X amount of items from the player inventory. Use this format: remove_item: <type>;<amount>;datavalue: <datavalue>;name: <name>;lorecontains: <lore_line>

Datavalue, name and lorecontains attributes are OPTIONAL. Don't use color formatting.

You can find a list of valid types of items here: For latest versions: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html For 1.8: https://helpch.at/docs/1.8/org/bukkit/Material.html

You can also use the CheckItem expansion of PlaceholderAPI (https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#checkitem) to remove items, following this format: remove_item: %checkitem_remove_,,<...>%

# This will remove x5 Diamonds from the player inventory.
remove_item: DIAMOND;5

Remove Item Slot

Removes X amount of items from a certain slot of the player inventory. Use this format: remove_item_slot: <slot>;<amount>

Valid Slots: HAND, OFF_HAND, HELMET, CHESTPLATE, LEGGINGS, BOOTS You can also use numerical values, check all slots here: https://static.wikia.nocookie.net/minecraft_gamepedia/images/b/b2/Items_slot_number.png/revision/latest/scale-to-width-down/352?cb=20170708121246

remove_item_slot: HAND;1
remove_item_slot: 0;1

Firework

Spawns a firework from the player location. Use this format: firework: colors:<color1>,<color2> type:<type> fade:<color1>,<color2> power:<power> (optional)location:<x>;<y>;<z>;<world>

The fade property is optional, the rest are necessary. You can add more than 2 colors.

firework: colors:YELLOW,RED type:BALL fade:AQUA power:0

Particle

Spawns a particle on the player location. Use this format: particle: effect:<effect_name> offset:<x>;<y>;<z> speed:<speed> amount:<amount> (optional)location:<x>;<y>;<z>;<world>

Particle/Effect Names: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html Offset: The distribution of dispersion of the particle to spawn.

You can spawn a Redstone particle with colors setting the effect to:

REDSTONE;<red>;<green>;<blue> (1.9-1.20.4)

DUST;<red>;<green>;<blue> (1.20.5+) Color codes: https://htmlcolorcodes.com/

Only works on 1.9+

particle: effect:EXPLOSION_LARGE offset:0.1;0.1;0.1 speed:1 amount:5

Give Item

Gives an item to the player. Use this format: give_item: id:<id>;<property>:<value>;<propertyN>:<valueN>

General properties:

id:<id> (MANDATORY, all ids here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html) amount:<amount> durability:<durability> custom_model_data:<custom_model_data> name:<name> lore:<lore_line1>|<lore_lineN> enchants:<enchant1>-<level1>|<enchantN>-<levelN> (All enchant names here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html) flags:<flag1>|<flagN> (All flag names here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html)

Player Head properties:

skull_texture:<skull_texture> (Texture value of the head. Can be found here: https://minecraft-heads.com/custom-heads) skull_owner:<skull_owner> (A player name) skull_id:<skull_id> (Skull Id value of the head. Can be found here: https://minecraft-heads.com/custom-heads) Slot properties:

slot:<slot> (If you want to give the item on a certain slot. Valid Slots: HAND, OFF_HAND, HELMET, CHESTPLATE, LEGGINGS, BOOTS. You can also use numerical values, check all slots here: https://static.wikia.nocookie.net/minecraft_gamepedia/images/b/b2/Items_slot_number.png/revision/latest/scale-to-width-down/352?cb=20170708121246) slot_replace:<true/false> (Whether you want to replace any items on the selected slot)

give_item: id:IRON_HELMET;amount:1;name:&6Basic Helmet

Drop Item

Drops an item in a certain location. Use this format: drop_item: location:<x>,<y>,<z>,<world>;id:<id>;<property>:<value>;<propertyN>:<valueN>

General properties:

id:<id> (MANDATORY, all ids here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html) location:<x>,<y>,<z>,<world> (MANDATORY)

All give_items action properties apply as well!

drop_item: location:%block_x%,%block_y%,%block_z%,%block_world%;id:DIAMOND;name:&bUnique Diamond

Set Block

Places a block in a certain location. Use this format: set_block: location:<x>,<y>,<z>,<world>;id:<id>;block_data:<block_data>. Only works on 1.13+.

General properties:

id:<id> (MANDATORY, all ids here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html) location:<x>,<y>,<z>,<world> (MANDATORY)

Optional properties:

Block data

The block data attribute is OPTIONAL and represent some states that the block can have. For example a stairs block could be facing north, south, east, west. A crops block has an age property.

This property has the following format: <property1>=<value1>,<propertyN>=<valueN>

You can check all Block Data properties here: https://minecraft.fandom.com/wiki/Java_Edition_data_values#Block_states

Skull data

skull_texture:<skull_texture> (Texture value of the head. Can be found here: https://minecraft-heads.com/custom-heads) skull_owner:<skull_owner> (A player name)

set_block: location:50,50,-256,world;id:DIAMOND_BLOCK

Summon

Spawns an entity at a certain location. Use this format: summon: location:<x>,<y>,<z>,<world>;entity:<entity>;<property>:<value>;<propertyN>:<valueN>

General properties:

entity:<entity> (MANDATORY, all entities here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html) location:<x>,<y>,<z>,<world> (MANDATORY)

Optional properties:

custom_name:<custom_name> (Custom name to be displayed above the entity) health:<health> (Max health of the entity) amount:<amount> (Amount of entities to spawn) Equipment property: equipment:<helmet>,<chestplate>,<leggings>,<boots>

Equipment of the entity, use a valid material on each slot: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html or 'none' if you don't want an item on the slot.

You can also use a texture value on the <helmet> slot to set a custom head.

summon: location:0,68,0,spawn;entity:SHEEP

Call Event

Executes a "call" event. Use this format: call_event: <event_name>;%variable1%=<value1>;%variableN%=<valueN>

You can pass multiple variables to be used in a "call" event, but they are optional.

example:
    type: player_command
    conditions:
    - "%main_command% == /test"
    actions:
      default:
      - "cancel_event: true"
      - "message: This is a test message from event 'example'"
      - "call_event: example2;%example_variable%=Something"

example2:
    type: call
    conditions:
    - "%example_variable% == Something"
    actions:
      default:
      - "message: This message will be sent only when event 'example2' is called"

Execute Action Group

Executes another action group from the event, randomly. Use this format: execute_action_group: <group1>:<prob1>;<groupN>:<probN> where <group> is the name of a created action group of the event, and <probability> is the chance of selecting the event (The probabilities don't need to sum 100%).

If you only want to execute a single action group, not randomly, you can do it by using: execute_action_group: <group1>:100

example:
    type: player_command
    conditions:
    - "%main_command% == /randomfirework"
    actions:
      default:
      - "cancel_event: true"
      - "execute_action_group: firework1:70;firework2:30;firework3:30"
      firework1:
      - "firework: colors:YELLOW,RED type:BALL fade:AQUA power:0"
      firework2:
      - "firework: colors:BLACK,WHITE type:BURST power:1"
      firework3:
      - "firework: colors:GREEN,BLUE type:BURST power:1"

Last updated