Action

An action is what determines what will be done when executed by an event.

An action has 3 properties

actions:
  action_test:
    action_type: CHAT_MESSAGE
    message: '&9%user% &csend a &6%comment%'
    entity: WOLF
    sound: 'minecraft:entity.player.levelup'
    call: 'callOtherFunction'
    commands:
      - 'tp %player% 0 100 0'
    material: STONE
    custom_params: ...

action_type (T): This is the type you want to perform when executing this action

message: This property only works on the CHAT_MESSAGE type and defines the message that will be sent when the action is executed.

entity: This property only works on the SPAWN_ENTITY type and defines the type of entity that will spawn when the action is executed. (Entity list)

commands: This property only works in the EXECUTE_COMMAND type and defines the commands when executing the action

material: This property only works on the SPAWN_BLOCK type and defines the material of the block that will spawn. (List of materials)

sound: This property only works with the PLAY_SOUND type and defines the sound you will hear when the action is executed.

call: This property is used to tell the action that it will be linked to another plugin that has registered that call.

custom_params (C_P): The custom parameters are a bit more extensive but to sum it up they are variables with which you can further modify each of your actions.

TYPES

  • EXECUTE_COMMAND

  • SPAWN_ENTITY

  • SPAWN_BLOCK

  • CHAT_MESSAGE

  • PLAY_SOUND

  • CUSTOM

Last updated