Minecraft commands are typed in two places, and the same command looks slightly different in each.
Where to type a command
In the panel Console. Open your server in the panel, click Console, click the box that says Type a command, type the command without a slash and press Enter. The server must be Online. The Console runs with full rights, so no operator status is needed. Java servers answer commands there, for example list shows who is online.
The examples below are written for the Console. In game, put a slash in front.
A command changes the running game. Some commands only last until a restart, so for a setting you want on every start, use Settings instead: it is saved and applied each time the server starts. Game rules can also be changed from Settings, then Game Rules, and they apply at once. See How to use the console and run commands.
The commands below are for Java Edition. Bedrock has its own list, shown near the end.
Players and access
The level column is the operator level needed in game. The Console needs none.
Command
What it does
Level
list
Shows who is online
0
op Alex
Makes Alex an operator
3
deop Alex
Removes Alex's operator rights
3
whitelist add Alex
Lets Alex join when the whitelist is on. Also remove, list, on, off, reload
Sets Alex's game mode to survival, creative, adventure or spectator
2
defaultgamemode survival
Sets the mode new players start in
2
difficulty hard
Sets peaceful, easy, normal or hard
2
time set day
Sets the time. Also night, noon, midnight or a number
2
weather clear
Sets the weather to clear, rain or thunder
2
tp Alex Sam
Teleports Alex to Sam. Coordinates also work
2
give Alex diamond 16
Gives Alex 16 diamonds
2
gamerule keepInventory true
Changes a game rule. On the newest versions the rule is written keep_inventory. Names differ between versions, so use the list the game suggests
2
setworldspawn
Sets the world spawn point
2
worldborder set 5000
Sets the size of the world border in blocks
2
seed
Shows the world seed
2
kill Alex
Kills Alex
2
effect give Alex speed 60
Gives Alex an effect for 60 seconds
2
xp add Alex 10 levels
Gives Alex experience
2
locate structure village
Finds the closest structure of a kind
2
If you are unsure about the exact words, type the command and press the tab key in game, which suggests what comes next. The Minecraft Wiki lists every option of every command.
Saving and stopping
Command
What it does
Level
save-all
Writes the world to disk now. Run it before you take a backup
4
save-off
Pauses automatic saving. Run save-on afterwards to resume
These commands are for the Bedrock server type. Pocketmine is a different program with its own commands, so type help in the Console to see what it knows. Microsoft's server guide lists these commands for the server console, typed in the Console tab without a slash:
Command
What it does
help
Lists the commands the server knows
op Alex
Makes Alex an operator
deop Alex
Removes operator rights
gamerule
Lists the current game rules
gamerule doDaylightCycle false
Changes a game rule. Use the exact rule name
allowlist add Alex
Adds a player to the allow list. Also remove, list and reload
stop
Shuts the server down
Cheat commands in game also need Allow cheats on, under Settings, then Game Settings. If a command does nothing in the Console, open a ticket. See How to open a support ticket.
CREATE YOUR GAME SERVER READY TO GET STARTED?
Save up to 30% on your new game server. Premium performance, instant activation, and unbeatable reliability all at a better price.