Skip to content

Activator GAME_MODE

MaxDikiy edited this page Oct 27, 2017 · 1 revision

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.

Temporary placeholders active in this activator

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).

Examples

  1. Prohibit the player to changes gamemode to creativity:
    /react add GAMEMODE gm gamemode:creative
    /react add gm a CANCEL_EVENT true

or

GAME_MODE:
  gm:
    gamemode: creative
    actions:
    - cancel_event=true
  1. To know the game mode for which the player wants to switch:
GAME_MODE:
  gm2:
    gamemode: ANY
    actions:
    - broadcast=&ePlayer &a%player% &eswitching gamemode to &c&l%gamemode% 
Clone this wiki locally