Commands/gamemode

Sets a player's game mode.

Syntax

 * Java Edition


 * Bedrock Edition
 * An alternate syntax allows player to enter game mode by its number:
 * An alternate syntax allows player to enter game mode by its number:

Arguments
(BE:  or  )
 * Must be one of:
 * (can be abbreviated as  or   $$) for survival mode
 * (can be abbreviated as  or   $$) for creative mode
 * (can be abbreviated as  or   $$) for adventure mode
 * for spectator mode
 * "hardcore" is not a valid option for the mode argument, as it is technically not a game mode.

(BE: )
 * If specified, must be either a player's username or a target selector. If unspecified, defaults to the player using the command. When used in a command block, it is not optional.
 * Entities other than players are not allowed.

Result
Fails if the arguments are not specified correctly, or if  fails to resolve to one or more online players.

On success, changes the game mode of the default or specified players.

Examples

 * To put the executing player into creative mode:


 * To put all players into survival mode

History
Befehl/gamemode Comandos/gamemode Команды консоли/gamemode Команди консолі/gamemode 命令/gamemode