Set a Player's Game Mode in Minecraft
The /gamemode command changes a player's game mode in Minecraft Bedrock Edition. You can set the mode using either a standard game mode name or a number.
Players and server administrators use this command to switch between modes for building, testing maps, or managing other players on a world. To run this command, you must have cheats enabled and a Game Directors permission level.
/gamemode <gameMode: GameMode> [player: target]Set game mode with enum
/gamemode <gameMode: int> [player: target]Set game mode with integer
| Argument | Type | What it means |
|---|---|---|
gameMode | GameMode | Game mode enum |
gameMode | int | Game mode integer |
player | target | A player name `string` or `target selector` to identify the player. |
/gamemode creativeChanges your own game mode to Creative using the game mode name.
/gamemode survival @pSets the nearest player's game mode to Survival.
/gamemode adventure @aPuts all players in the world into Adventure mode at the same time.
/gamemode default AlexSets the player named Alex to the world's default game mode.
/gamemode 1 SteveUses the integer 1 to change the player named Steve into Creative mode.
/gamemode 0 @rUses the integer 0 to put a random player into Survival mode.
/gamemode 2 @sUses the integer 2 to set the player running the command into Adventure mode.
/gamemode spectator @a[r=10]Changes all players within a 10-block radius into Spectator mode.
In Minecraft Java Edition, the equivalent command is /gamemode <gamemode> [<target>], which follows the same argument order as Bedrock Edition.
The /gamemode command requires cheats to be enabled in your world settings and your account must have the Game Directors permission level.
Add the player's name or a target selector at the end of the command, right after you enter the game mode.
Yes, Bedrock Edition allows you to use an integer value instead of the game mode name to set a player's game mode.
/aimassist/camera/camerashake/clearspawnpoint/controlscheme/damage/effect/event/hud/inputpermission/kill/ride/spawnpoint/spreadplayers/summon/teleport