Minecraft Interactive Experience
Do you like this video?
Sets a player's game mode.
- Java Edition
gamemode (adventure|creative|spectator|survival) [<target>]
- Bedrock Edition
gamemode <gameMode: GameMode> [player: target]
gamemode <gameMode: int> [player: target]
- Specifies the new game mode. Must be one of the following:
survival(can be abbreviated as
0in Bedrock Edition) for survival mode
creative(can be abbreviated as
1in Bedrock Edition) for creative mode
adventure(can be abbreviated as
2in Bedrock Edition) for adventure mode
default(can be abbreviated as
5) for default gamemode [Bedrock Edition only]
spectator(can be abbreviated as
6in Bedrock Edition) for spectator mode
- "hardcore" is not a valid option for the
<mode>argument, as it is technically not a game mode.
- Specifies the target(s). If not specified, defaults to the player who executes the command.
- Must be a player name, a target selector or a UUID[Java Edition only]. And the target selector must[JE only]/should[BE only] be of player type.
|Command||Trigger||Java Edition||Bedrock Edition|
|any||the arguments are not specified correctly||Unparseable||Unparseable|
|On success||Sets the game mode of the specified players|
|any||Java Edition||On fail||0||0||0|
|On success||1||1||the number of players whose game mode is changed.|
|Bedrock Edition||On fail||0||N/A||N/A|
|On success||the number of targeted players.||N/A||N/A|
- To put the executing player into creative mode:
- To put all players into survival mode:
gamemode survival @a
/defaultgamemode– sets the initial game mode for players joining the world.
|Java Edition Beta|
|Syntax changed to |
|12w30a||Changed the ID for survival mode from |
|1.13||17w45a||Removed abbreviated forms and numeric IDs.|
|Pocket Edition Alpha|
|v0.16.0||build 1||Added |
|Functionality is almost equivalent to Java Edition 1.10 usage, except |
|1.1.0||alpha 188.8.131.52||Added |
|1.18.30||beta 184.108.40.206||Added |