NEW 📢 Black Friday: our launch offer ends 30 Nov. Up to 70% off your first month on every game!See plans
Black FridayUp to 70% off your first month, ends 30 NovEnds in 9d 01h 29mBlack FridayUp to 70% off your first month, ends 30 NovEnds in 9d 01h 29mBlack FridayUp to 70% off your first month, ends 30 NovEnds in 9d 01h 29m

Minecraft commands for server owners

MinecraftUpdated Oct 28, 20265 min read

Type Minecraft commands in the panel's Console without a slash, or in the game's chat with a slash. The Console needs no operator status. In the game, you need to be an operator with a high enough level, shown for each command below.

Where to type a command

The Console with output and the Type a command box

The examples below are written for the Console. In the game, put a slash in front. The level column is the operator level needed in the game.

Some commands only change the running game. For a setting you want after every restart, use Settings: Minecraft server properties explained. Game rules are also on Settings, Game Rules: How to change game rules on your Minecraft server.

Players and access

CommandWhat it doesLevel
listLists the players on the server0
msg Alex helloSends Alex a private message0
say Restart in 5 minutesShows a message to everyone2
op AlexMakes Alex an operator3
deop AlexRemoves Alex's operator rights3
whitelist add AlexAdds Alex to the whitelist3
kick AlexRemoves Alex from the server for now3
ban AlexBans Alex3
pardon AlexLifts Alex's ban3
ban-ip 203.0.113.5Bans an IP address3
pardon-ip 203.0.113.5Lifts an IP ban3
banlistShows the ban list3

whitelist also takes remove, list, on, off and reload. The Players page does all of these without commands: How to manage players on your Minecraft server with the Players page.

Game and world

CommandWhat it doesLevel
gamemode creative AlexSets Alex's game mode2
defaultgamemode survivalSets the mode new players start in2
difficulty hardSets the difficulty2
time set dayChanges the time of day2
weather clearSets the weather2
tp Alex SamTeleports Alex to Sam2
give Alex diamond 16Gives Alex 16 diamonds2
effect give Alex speed 60Gives Alex an effect for 60 seconds2
xp add Alex 10 levelsGives Alex experience2
kill AlexKills Alex2
gamerule keep_inventory trueChanges a game rule2
setworldspawn 100 64 -200Sets the world spawn to those coordinates2
worldborder set 5000Sets the world border's size2
locate structure #villageFinds the closest village of any kind2
seedShows the world seed2

Game rule names changed in Minecraft 1.21.11: before it, keep inventory is written keepInventory. The Game Rules page shows the names your version uses.

Saving and stopping

CommandWhat it doesLevel
save-allSaves the world to disk now4
save-offTurns off automatic saving4
save-onTurns automatic saving back on4
stopStops the server4

The Stop and Restart buttons in the panel are the usual way to stop or restart. If you use save-off, always run save-on afterwards.

Run commands without typing them

Quick Tasks has ready-made Minecraft tasks such as Save World, Announce to Players and Reload Whitelist, and can run a command on a schedule. See How to use Quick Tasks on your Minecraft server.

Plugin commands

Plugins add their own commands, listed in each plugin's documentation. Type help in the Console to list the commands your server knows.

Already hosting it somewhere else? Move your server to us

OUR LATEST BLOGS