1. Switch yourself to creative
Leaving the target empty applies it to whoever typed the command — by far the most common use
/gamemode creative
What it does Will change the game mode of yourself to creative.
Change a player's game mode: survival, creative, adventure, or spectator
The examples below come out of the same generator as the form above, so the commands and explanations always match what the tool produces. Copy one and adjust it from there
Leaving the target empty applies it to whoever typed the command — by far the most common use
/gamemode creative
What it does Will change the game mode of yourself to creative.
Run it when a minigame starts, so nobody is left in creative from the previous round
/gamemode survival @a
What it does Will change the game mode of all players to survival.
Spectator suits players who are already out — they can watch without interfering with the ones still playing
/gamemode spectator @s
What it does Will change the game mode of themselves (whoever runs the command) to spectator.
This is the first example above, run through every edition and version this tool supports. Versions that produce the same result share a row
Every version this tool supports produces the same result, so a command you copy works without version-specific edits
/gamemode creative