/gamemode
Sets a player's game mode to survival, creative, adventure, or spectator.
Syntax
/gamemode <gamemode> [<target>]Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| gamemode | gamemode | Required | The game mode to set: survival, creative, adventure, or spectator. |
| target | entity | Optional | The player(s) to change. Defaults to self. |
Examples
/gamemode creativeSets your own game mode to creative.
/gamemode survival @aSets all players to survival mode.
/gamemode spectator @pPuts the nearest player into spectator mode.
Common Mistakes
- Using numeric mode IDs (0, 1, 2, 3), Java Edition 1.13+ requires the full name (survival, creative, adventure, spectator).
- Forgetting that switching from creative to survival removes the ability to fly, causing fall damage if airborne.
Notes
Switching to creative while falling negates fall damage. Switching from creative to survival while flying will cause the player to fall.
Related Commands
Need a Minecraft server?
Try these commands on Astroworld or host your own server.
Try Astroworld Hosting