-'to_target: give_potion_effect: POISON;120;1'-'to_target: message: &cYou were poisoned by &e%player%&c!'
This can target both players and living entities, so you can use certain actions on entities as well.
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:
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.
- 'to_range: 10;true: message: &6This message is sended to all players in a radius of 10 blocks!'
- 'to_range: 10;false: message: &6%player% says: &7Hello %to:player%!'
- 'to_range: 5;false;true: damage; 10'