Event Actions

These are special actions that only work with certain events.

KEEP ITEMS

This action only works for player_death 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 block_break and player_kill 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 player_attack and player_damage 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

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

hide_join_message: true

HIDE LEAVE MESSAGE

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

hide_leave_message: true

SET DEATH MESSAGE

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

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

PREVENT JOIN

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

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

SET ITEM

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

Item properties you can use are described on the Give Item action.

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

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

set_event_xp: 0

Last updated