Chapter 4

Action

The operation to be executed

Subsections of Action

Overview

  • Actions are used when you want to execute something on certain events (broadcast everyone when the player clicked the button, etc).
  • There are many built-in types of actions (Check the sidebar). A developer can also create his own action and register to this plugin.

Example

hello:
  COMMAND: # Here are the actions
  - "tell: &eHello There"
  - "delay: 60"
  - "tell: &eHello Again"
  NAME: '&u&lHello Button'
  ID: stone
  POSITION-X: 1
  POSITION-Y: 1

Player Executor

This action will execute the command as a player

Format

  • <command>
  • player: <command>

Note

  • This is the default type of all actions, so you can specific the action without the prefix player:

Example

  • spawn
  • player: warp pvp
  • player: me Hello World!

Console Executor

This action will execute the command as the console (terminal)

Format

  • console: <command>

Example

  • console: say Hello {player}!

OP Executor

This action will execute the command as an operator (/op)

Warning

This action will give the player OP /op, execute the <command> and then de-op the player. Since it uses /op, this action is considered “dangerous”. A hacker can use a Crasher to exploit the action. It’s recommended to use Permission Executor instead.

Format

  • op: <command>

Example

  • op: stop

Permission Executor

This action will give the permissions to the player, execute the command and then retrieve the permissions

Format

  • permission(<permission>): <command>
  • permission(<permission_1>, <permission_2>, <permission_3>): <command>

Example

  • permission(essentials.fly): fly
  • permission(essentials.gamemode, essentials.gamemode.creative): gamemode 1

Open Menu

This action will open the specific menu.

Format

  • open-menu: <menu_name>
  • open: <menu_name>
  • menu: <menu_name>

Example

  • open-menu: example.yml
  • open: pvp.yml
  • menu: test.yml
Note

You can bypass open requirements of the menu by adding bypassChecks to the action. For example: open(bypassChecks): pvp.yml

Update Menu

This action will execute the update task of the current menu.

Format

  • update-menu
  • updatemenu

Back Menu

This action will send the player to his previous menu, or close the current menu if there is no previous menu.

Format

  • back-menu
  • backmenu

Close Menu

This action will close the current menu.

Format

  • close-menu
  • closemenu

Broadcast Message

This action will send the message to every online players

Format

  • broadcast: <message>

Example

  • broadcast: Hello

Tell Message

This action will send the message to the player.

Format

  • tell: <message>

Example

  • tell: You there?

Play Sound

This action will send the sound to the player.

Format

  • sound: <sound>, [volume], [pitch]
  • sound: <sound> [volume] [pitch]
  • raw-sound: <sound>, [volume], [pitch]
  • raw-sound: <sound> [volume] [pitch]

Note

  • <sound> supports Minecraft’s sound name, so it also supports custom sounds from Resource Pack. If the <sound> can not be found, the action is simply ignored.
  • You can specify the [volume] and the [pitch] of the <sound>. Those are optional.

Example

  • sound: BLOCK_NOTE_BLOCK_PLING
  • sound: BLOCK_NOTE_BLOCK_PLING 1 2

Delay

This action will delay the action flow in the specific ticks (20 ticks = 1 second)

Format

  • delay: <ticks>

Example

  • delay: 20
  • delay: 100