"To" Actions

These are special tags that allows you to execute the action to a certain group of players. These tags need to be added before the action.

TO ALL

It will execute the action for all players on the server. Use this format: "to_all: <action>"

- 'to_all: message: &a%player% just leveled up!'
- 'to_all: message: &7Hello &a%to:player% &7your level is &a%to:player_level%&7!'

TO TARGET

This is a special action for player_attack , player_kill , entity_interact and player_fish events. It will execute the action for the target of the event. Use this format: "to_target: <action>"

 - 'to_target: give_potion_effect: POISON;120;1'
 - 'to_target: message: &cYou were poisoned by &e%player%&c!'
circle-check

TO WORLD

It will execute the action for all players in a world. Use this format: "to_world: <world>: <action>"

- 'to_world: spawn: message: &6This message is sended to all players in the SPAWN world.'
- 'to_world: %player_world%: message: &6Hello to this world!'

TO RANGE

It will execute the action for all players inside a certain radius of blocks.

  • You can decide whether to include the player involved in this event or not.

  • You can also decide whether to include any other entity (and not only players).

Use this format: "to_range: <radius>;<include_player>;<include_entities>: <action>"

TO PLAYER

It will execute the action for a certain player. Use this format: "to_player: <player>: <action>"

Full Example

This is an example of a private message system. When the player uses the /message <player> <text> command, and the selected player is online, a message will be sent to that player and the one using the command.

TO CONDITION

It will execute the action for all the players that accomplish certain conditions. It is necessary to have previously defined a condition group in the config, as show below:

circle-info

You can create multiple to condition groups following the same format as the usual conditions, excluding the "execute" option.

Next, you can use the previously created condition group "group1" in a to_condition action using the following format: "to_condition: <group>: <action>"

Full Example

The previous event adds a /test command that will send a message ONLY to the players that have the conditionalevents.somepermission permission.

Last updated