This activator works when the player changes the game mode.
To create this activator, use the command:
/react add GAME_MODE <ActivatorName> [gamemode]
Element | Possible Values | Description |
---|---|---|
[gamemode] | SURVIVAL CREATIVE ADVENTURE SPECTATOR ANY | The game mode that the activator will track. Default is gamemode: ANY . This means that the activator will work whenever you switch the game mode. |
Placeholder | Description |
---|---|
% gamemode% | shows the mode of the player's game. Useful when you need to constantly monitor the game mode (you can write to a variable). |
/react add GAMEMODE gm gamemode:creative
/react add gm a CANCEL_EVENT true
or
GAME_MODE:
gm:
gamemode: creative
actions:
- cancel_event=true
GAME_MODE:
gm2:
gamemode: ANY
actions:
- broadcast=&ePlayer &a%player% &eswitching gamemode to &c&l%gamemode%