"To" Actions
These are special tags that allows you to execute the action to a certain group of users. 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 TARGET
This is a special action for player_attack
,player_kill
and entity_interact
events. It will execute the action for the target of the event. Use this format: "to_target: <action>"
TO WORLD
It will execute the action for all players in a world. Use this format:
"to_world: <world>: <action>"
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. Use this format:
"to_range: <radius>;<include_player>: <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.
Last updated