ConditionalEvents
  • ConditionalEvents Wiki
  • How to Start
  • Events Tutorial
  • Event Types
    • Player Events
    • Block Events
    • Item Events
    • Other Events
    • Plugin Events
  • Conditions
  • Actions
    • "To" Actions
    • Event Actions
    • Plugin Actions
  • Variables
  • Custom Events
  • Commands and Permissions
  • Config.yml
  • PlaceholderAPI Variables
  • API
  • Videos
  • Addons
Powered by GitBook
On this page
  • Message
  • Centered Message
  • Console Message
  • JSON Message
  • Mini Message
  • Console Command
  • Player Command
  • Player Command as Op
  • Player Send Chat
  • Teleport
  • Give Potion Effect
  • Remove Potion Effect
  • Cancel Event
  • Kick
  • Play Sound
  • Play Sound Resource Pack
  • Stop Sound
  • Gamemode
  • Send to Server
  • Actionbar
  • Title
  • Damage
  • Set On Fire
  • Freeze
  • Heal
  • Set Food Level
  • Close Inventory
  • Clear Inventory
  • Wait
  • Wait Ticks
  • Remove Item
  • Remove Item Slot
  • Firework
  • Lightning Strike
  • Particle
  • Give Item
  • Drop Item
  • Set Block
  • Summon
  • Call Event
  • Execute Action Group

Was this helpful?

Actions

PreviousConditionsNext"To" Actions

Last updated 28 days ago

Was this helpful?

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:

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

Mini Message

Only works on Paper 1.19.4+.

mini_message: Welcome to the <b><color:#91ff52>SERVER</color></b>!

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_potion_effect: POISON;120;1;false

Remove Potion Effect

Removes a potion effect from the player. Use "all" to remove all potion effects.

remove_potion_effect: POISON
remove_potion_effect: all

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

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

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

Set Food Level

Sets the current food level of the player with a specific amount. Should be between 0 and 20.

set_food_level: 20

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.

# This will remove x5 Diamonds from the player inventory.
remove_item: DIAMOND;5
# This will remove x5 Diamonds named 'Unique Diamond' 
# from the player inventory.
remove_item: DIAMOND;5;name: Unique Diamond
# This will remove x1 Coal Block named "Burst Turret"
# from the player inventory.
# You must download the CheckItem expansion from PlaceholderAPI
# using /papi ecloud download CheckItem
remove_item: %checkitem_remove_mat:COAL_BLOCK,nameequals:&aBurst &6Turret,amt:1%

Remove Item Slot

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

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> <propertyN>:<valueN>

Mandatory Properties:

power:<power> (Power of the firework, could be 0,1,2,3)

Optional Properties:

flicker:<true/false> (Whether the firework must have the flicker property or not)

trail:<true/false> (Whether the firework must have the trail property or not)

location:<x>;<y>;<z>;<world> (Location to spawn the firework)

shot_direction:<x_min>,<x_max>;<y_min>,<y_max>;<z_min>,<z_max>;<velocity_min>-<velocity_max> (Direction and velocity of the firework. Use values between -1 and 1 on the x,y,z properties, and values higher than 0 in the velocity property. Only works on 1.15+)

firework: colors:YELLOW,RED type:BALL fade:AQUA power:0
firework: colors:#fdbeff,#ff856b type:BALL power:0
firework: colors:BLACK,WHITE type:BURST power:1 location:%block_x%;%block_y%;%block_z%;%block_world%
firework: colors:YELLOW type:BALL power:0 shot_direction:-1,1;1,1;-1,1;0.5-0.5 trail:true flicker:true

Lightning Strike

Generates a lightning strike effect that does no damage, at certain location. Use this format: lightning_strike: <world>;<x>;<y>;<z>

lightning_strike: %victim_block_world%;%victim_block_x%;%victim_block_y%;%victim_block_z%

Particle

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

You can spawn a Redstone particle with colors, configuring the effect as:

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

Only works on 1.9+

particle: effect:EXPLOSION_LARGE offset:0.1;0.1;0.1 speed:1 amount:5
particle: effect:REDSTONE;25;229;198 offset:0.1;0.1;0.1 speed:0.1 amount:2 location:%block_x%;%block_y%;%block_z%;%block_world%

Give Item

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

General properties:

Player Head properties:

Model (1.21.4+):

saved_item:<name> (If instead you want to give an already saved item using /ce item save command)

give_item: id:IRON_HELMET;amount:1;name:&6Basic Helmet
give_item: id:NETHERITE_SWORD;amount:1;name:&4&lNether Sword;lore:&7This sword was forged in the cursed|&7lands of the Nether...;flags:HIDE_ATTRIBUTES;enchants:FIRE_ASPECT-2
give_item: id:PLAYER_HEAD;amount:16;skull_owner:%player_name%
give_item: id:NETHERITE_SWORD;amount:1;slot:OFF_HAND;slot_replace:true
give_item: saved_item:super_sword

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:

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:

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>

Skull data

set_block: location:50,50,-256,world;id:DIAMOND_BLOCK
# Useful to regenerate blocks
set_block: location:%block_x%,%block_y%,%block_z%,%block_world%;id:%block%;block_data:%block_data%
set_block: location:50,50,-256,world;id:CHEST;block_data:facing=north

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:

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/Hand Equipment properties: equipment:<helmet>,<chestplate>,<leggings>,<boots>

hand_equipment:<main_hand>,<off_hand>

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

You can also use a Saved Item on a slot like this: saved_item:<name>

summon: location:0,68,0,spawn;entity:SHEEP
summon: location:0,68,0,spawn;entity:SKELETON;custom_name:&cShadow Warrior;health:80
summon: location:%player_x%,%player_y%,%player_z%,%player_world%;entity:ZOMBIE;custom_name:&4Aberration;equipment:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDJhMmFlNzQ5ZDAzYWU1Y2U3MmJjMmEyNmQyZTJhNThjZDVmMmU0MGM4ODMxODRiZjk2YzZhMjcwMDc4MmQyNiJ9fX0=,IRON_CHESTPLATE,none,none;amount:4
summon: location:0,90,0,world;entity:ZOMBIE;equipment:none,saved_item:orange_chestplate,none,none;amount:1
summon: location:%player_x%,%player_y%,%player_z%,%player_world%;entity:ZOMBIE;equipment:none,IRON_CHESTPLATE,none,none;hand_equipment:IRON_SWORD,SHIELD

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"

Sends a message in the Mini Message format

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:

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: Use this list instead when using 1.8:

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:

You can find a list of valid types of items here: For latest versions: For 1.8:

You can also use the CheckItem expansion of PlaceholderAPI () to remove items, following this format: remove_item: %checkitem_remove_,,<...>%

Valid Slots: HAND, OFF_HAND, HELMET, CHESTPLATE, LEGGINGS, BOOTS You can also use numerical values, check all slots here:

colors:<color1>,<color2>,<colorN> (Main colors of the firework. All colors here: . You can specify the name of the color, or a HEX color code in this format: #<color>)

type:<type> (Type of the firework. All types here: )

fade:<color1>,<color2>,<colorN> (Fade colors of the firework. All colors here: . You can specify the name of the color, or a HEX color code in this format: #<color>)

Particle/Effect Names: Offset: The distribution of dispersion of the particle to spawn. Force: Whether to force show the particles to the player regardless of the client settings.

DUST;<red>;<green>;<blue> (1.20.5+) Color codes:

id:<id> (MANDATORY, all ids here: ) 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: ) flags:<flag1>|<flagN> (All flag names here: )

skull_texture:<skull_texture> (Texture value of the head. Can be found here: ) skull_owner:<skull_owner> (A player name) skull_id:<skull_id> (Skull Id value of the head. Can be found here: ) 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: ) slot_replace:<true/false> (Whether you want to replace any items on the selected slot) Custom Model Component Data properties (1.21.4+):

More info here: custom_model_component_data_strings:<string1>|<stringN> custom_model_component_data_flags:<flag1>|<flagN> custom_model_component_data_floats:<float1>|<floatN> custom_model_component_data_colors:<color1>|<colorN>

More info here: item_model:<namespace>|<id> Saved item:

id:<id> (MANDATORY, all ids here: ) location:<x>,<y>,<z>,<world> (MANDATORY)

id:<id> (MANDATORY, all ids here: ) location:<x>,<y>,<z>,<world> (MANDATORY)

You can check all Block Data properties here:

skull_texture:<skull_texture> (Texture value of the head. Can be found here: ) skull_owner:<skull_owner> (A player name)

entity:<entity> (MANDATORY, all entities here: ) location:<x>,<y>,<z>,<world> (MANDATORY)

Equipment of the entity, use a valid material on each slot: or 'none' if you don't want an item on the slot.

https://minecraft.tools/en/json_text.php
https://docs.advntr.dev/minimessage/index.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
https://helpch.at/docs/1.8.8/index.html?org/bukkit/Sound.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
https://helpch.at/docs/1.8/org/bukkit/Material.html
https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#checkitem
https://static.wikia.nocookie.net/minecraft_gamepedia/images/b/b2/Items_slot_number.png/revision/latest/scale-to-width-down/352?cb=20170708121246
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Color.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/FireworkEffect.Type.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Color.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html
https://htmlcolorcodes.com/
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html
https://minecraft-heads.com/custom-heads
https://minecraft-heads.com/custom-heads
https://mcutils.com/inventory-slots
https://minecraft.wiki/w/Data_component_format/custom_model_data
https://minecraft.wiki/w/Items_model_definition
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
https://minecraft.fandom.com/wiki/Java_Edition_data_values#Block_states
https://minecraft-heads.com/custom-heads
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html