Other Events

ENTITY INTERACT

Event called when a player right clicks an entity.

example:
  type: entity_interact
  conditions:
  - '%entity% == PLAYER'
  - '%player_is_sneaking% == yes'
  actions:
    default:
    - "player_command: trade %target:player_name%"

On this event you can use target player variables and to_target actions.

ENTITY SPAWN

Event called when an entity (animal or monster) is going to spawn.

example:
  type: entity_spawn
  conditions:
  - '%entity% == WITHER'
  - '%entity_world% == survival'
  actions:
    default:
    - "cancel_event: true"

CONSOLE COMMAND

Event called when the console executes a command.

example:
  type: console_command
  conditions:
  - '%command% startsWith addperm'
  actions:
    default:
    - 'cancel_event: true'
    - 'console_command: lp group %arg_1% permission set %arg_2%'

SERVER START

Event called when the server starts and the plugin is enabled.

example:
  type: server_start
  actions:
    default:
    - "console_command: ce enable event1"

This event has no variables, but you can still use ConditionalEvents variables or PlaceholderAPI variables.

SERVER STOP

Event called when the server stops and the plugin is disabled.

example:
  type: server_stop
  actions:
    default:
    - "to_all: message: &c&lCLOSING SERVER, WE ARE BACK SOON."

This event has no variables, but you can still use ConditionalEvents variables or PlaceholderAPI variables.

REPETITIVE

The repetitive event works by checking for conditions for each player periodically. The time is defined in the repetitive_time option. This option defines the period of time in TICKS (20 ticks = 1 second) when checking the conditions.

example:
  type: repetitive
  repetitive_time: 10
  conditions:
  - '%player_world% == plotworld'
  - '%player_gamemode% != CREATIVE'
  actions:
    default:
    - 'gamemode: CREATIVE'
    - 'actionbar: &6Changing gamemode to creative.;100'

This event has no variables, but you can still use ConditionalEvents variables or PlaceholderAPI variables.

REPETITIVE SERVER

The repetitive server event works by checking for conditions of the server periodically (like local time, but no player variables). The time is defined in the repetitive_time option. This option defines the period of time in TICKS (20 ticks = 1 second) when checking the conditions.

example:
  type: repetitive_server
  repetitive_time: 1200
  actions:
    default:
    - 'to_all: message: &7There are &a%server_online% &7players on the server.'

This event has no variables, but you can still use ConditionalEvents variables or PlaceholderAPI variables.

CALL

The call event is a special event that will be executed ONLY from the actions of another event (using the call_event action), or using the /ce call command.

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"
example2:
    type: call
    actions:
      default:
      - "message: This message will be sent only when event 'example2' is called"

This means you can now check for conditions after actions execution, using a complementary call event. You can also pass variables from an event to another to make it more specific.

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"

This event has no variables, but you can still use ConditionalEvents variables or PlaceholderAPI variables. Remember that a call event can be executed passing some variables from another event.

This event will be a player event if the original event which was called from is a player event.

CUSTOM

Any custom event that you want. You can use events from other plugins, more info on the Custom Events page.

Last updated

Was this helpful?