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
  • KEEP ITEMS
  • CANCEL DROP
  • SET DAMAGE
  • HIDE JOIN MESSAGE
  • HIDE LEAVE MESSAGE
  • SET DEATH MESSAGE
  • PREVENT JOIN
  • SET ITEM
  • SET EVENT XP
  • TAB COMPLETE

Was this helpful?

  1. Actions

Event Actions

Previous"To" ActionsNextPlugin Actions

Last updated 2 days ago

Was this helpful?

These are special actions that only work with certain events.

KEEP ITEMS

This action only works for event type. Allows the player to keep their items or xp on death. Possible values: items, xp, all

keep_items: items
keep_items: all

CANCEL DROP

This action only works for and event types. It will completely cancel item drops from the block/entity. It only works on 1.13+.

cancel_drop: true

SET DAMAGE

This action only works for and event types. Allows to modify the final damage of the attack/damage taken.

//Sets a custom value
set_damage: 15

//You can increment or decrement the final damage by a certain %.
//If set_damage is 150% and the player does 10 of damage, now the damage will be 15.
//If set_damage is 25% and the player does 10 of damage, now the damage will be 2.5.
set_damage: 150%
set_damage: 25%

HIDE JOIN MESSAGE

hide_join_message: true

HIDE LEAVE MESSAGE

hide_leave_message: true

SET DEATH MESSAGE

set_death_message: &fAn angry cactus killed &e%player%&f.
set_death_message: no

PREVENT JOIN

prevent_join: &c&lERROR!\n&7You can't access this account with that IP.

SET ITEM

You must make sure that the player is receiving an item. For that you must check for some conditions first. See the examples below.

set_item: <item_properties>
set_item: id:DIAMOND;name:&bSuspicious Diamond
example:
  type: player_fish
  conditions:
  - "%state% == CAUGHT_FISH" #Required
  - "%caught_type% == DROPPED_ITEM" #Required
  actions:
    default:
    - "set_item: id:DIAMOND;name:&bSuspicious Diamond"

SET EVENT XP

set_event_xp: 0

TAB COMPLETE

# Clears the current command arguments.
tab_complete: clear

# Sets the current command arguments.
tab_complete: set;<arg1>,<arg2>,<argN>
tab_complete: set;commands,economy,worlds

# Removes command arguments.
tab_complete: remove;<arg1>,<arg2>,<argN>
tab_complete: remove;worlds
# FULL EXAMPLE
Events:
  # Tab completion for a new "/help" command.
  custom_help_command_tab:
    type: player_tab_complete
    conditions:
    # Checks when the player writes the "/help" command.
    - "%main_command% == /help"
    # If the player is about to write the first argument, execute the show_arguments_1 action group.
    - "%args_length% == 1 execute show_arguments_1"
    # If the player is about to write the second argument, and the first argument is "worlds", 
    # execute the show_worlds_arguments action group.
    - "%args_length% == 2 and %arg_1% == worlds execute show_worlds_arguments"
    actions:
      # Clears the current arguments to display, and sets new ones.
      show_arguments_1:
      - "tab_complete: clear"
      - "tab_complete: set;commands,economy,worlds"
      # Sets new arguments to display, associated with the "/help worlds" command.
      show_worlds_arguments:
      - "tab_complete: set;overworld,nether,plots"
  
  # Functionality for the new "/help" command.
  custom_help_command:
    type: player_command
    conditions:
    # Checks when the player uses the "/help" command.
    - "%main_command% == /help"
    # If the first argument is "commands", execute the help_commands action group.
    - "%arg_1% == commands execute help_commands"
    # If the first argument is "economy", execute the help_economy action group.
    - "%arg_1% == economy execute help_economy"
    # If the first argument is "worlds", execute the help_worlds action group.
    - "%arg_1% == worlds execute help_worlds"
    actions:
      default:
      - "cancel_event: true"
      - "message: &cYou must use: &7/help <commands/economy/worlds>"
      help_commands:
      - "cancel_event: true"
      - "message: &fThis is the help page for &a&lCOMMANDS"
      help_economy:
      - "cancel_event: true"
      - "message: &fThis is the help page for &a&lECONOMY"
      help_worlds:
      - "cancel_event: true"
      # We need to check for the second argument, so a call event can be used.
      - "call_event: custom_help_command_worlds_argument;%selected_world%=%arg_2%"
  
  # Functionality for the "/help worlds" command.
  custom_help_command_worlds_argument:
    type: call
    conditions:
    - "%selected_world% == overworld execute world_overworld"
    - "%selected_world% == nether execute world_nether"
    - "%selected_world% == plots execute world_plots"
    actions:
      default:
      - "message: &cYou must use: &7/help worlds <overworld/nether/plots>"
      world_overworld:
      - "message: &fThis is the help page for &a&lWORLD &8- &e&lOVERWORLD"
      world_nether:
      - "message: &fThis is the help page for &a&lWORLD &8- &c&lNETHER"
      world_plots:
      - "message: &fThis is the help page for &a&lWORLD &8- &b&lPLOTS"

This action only works for event type. Allows to completely hide the player join message.

This action only works for event type. Allows to completely hide the player leave message.

This action only works for event type. Allows to replace the player death message with a custom one. You can set it to "no" to hide the death message.

This action only works for event type. Prevents the player from joining the server, with a custom message.

This action only works for event type. Allows to modify the item caught by the player.

Item properties you can use are described on the action.

These actions only works for and event types. Allows to modify the xp dropped when breaking a block or fishing. Set to 0 to prevent xp from being dropped.

This action only works for event type. Allows to modify the commands arguments displayed for the player in chat.

block_break
block_break
Give Item
player_death
player_kill
player_attack
player_damage
player_join
player_leave
player_death
player_pre_join
player_fish
player_fish
player_tab_complete