The most useful Minecraft server admin commands
There are two places to type commands. In the panel console you type them without the slash, for example time set day, and you need no permissions at all. In game you type them with a slash, /time set day, but you need to be an operator.
Every command that works gets a reply in the console, for example Set the time to 1000. If nothing shows up, the command did not run.

Players
| Command | What it does |
|---|---|
op Nick / deop Nick | gives and removes OP |
gamemode creative Nick | changes the game mode (survival, creative, adventure, spectator) |
tp Nick1 Nick2 | teleports a player to another player |
tp Nick 100 64 -200 | teleports to the X Y Z coordinates |
give Nick diamond 64 | gives an item |
clear Nick | clears the inventory |
kill Nick | kills the player |
xp add Nick 30 levels | adds 30 levels of experience |
effect give Nick minecraft:speed 60 1 | gives an effect for 60 seconds |
spawnpoint Nick | sets the player's respawn point where they stand |
Moderation
| Command | What it does |
|---|---|
list | shows who is online |
kick Nick Reason | kicks the player from the server |
ban Nick Reason / pardon Nick | bans and unbans (details) |
ban-ip Nick | bans the player's IP address |
whitelist on / whitelist add Nick | turns on the whitelist and adds a player (whitelist) |
World
| Command | What it does |
|---|---|
time set day / time set night | sets the time of day |
weather clear | stops rain and thunder |
difficulty hard | changes the difficulty |
setworldspawn | sets the world spawn where you stand (in game) |
seed | shows the world seed |
worldborder set 5000 | a world border 5000 blocks wide |
locate structure minecraft:village_plains | shows the coordinates of the nearest village |
kill @e[type=item] | removes every item lying on the ground |
The last one helps when thousands of items pile up in one spot and the server starts to lag. It removes everything on the ground in loaded chunks, so warn your players first.
Server
| Command | What it does |
|---|---|
say Message | a server announcement in the chat |
save-all | saves the world to disk |
stop | shuts the server down safely |
plugins | lists plugins (Paper, Purpur) |
tps | shows server performance (Paper, Purpur) |
Selectors: @a, @p, @r, @s
Instead of a name you can use a selector:
@a- all players, for examplegive @a bread 16,@p- the nearest player,@r- a random player, handy for giveaways,@s- yourself (in game only),@e- all entities, including mobs and items.
In game you can also use ~, which means "where I am standing": tp @a ~ ~ ~ brings every player to you.
Gamerule
The most popular one, on Minecraft 1.21.11 and newer:
gamerule keep_inventory true
On older versions: gamerule keepInventory true. Players keep their items when they die. More rules, such as turning off phantoms or creeper explosions, are in the guide on gamerules.
Common error messages
Unknown or incomplete command, see below for error- a typo or missing permissions. In game, without OP, admin commands are "unknown" to you.No player was found- wrong name, or the player is offline. Most commands only work on online players.Incorrect argument for command- wrong order or name, for examplegamemode Nick creativeinstead ofgamemode creative Nick.Unknown item- item names are in English with underscores, for examplegolden_apple.
Frequently asked questions
I type /op in the console and it does not work.
Leave out the slash in the panel console: op Nick. The slash is only needed in game.
A player types a command and gets "Unknown or incomplete command".
They do not have permission, or the command has a typo. Plugin commands need permissions from a permissions plugin such as LuckPerms.
Where do I find the item name for the give command?
In game press F3 + H. The item's ID appears under its name in your inventory, for example minecraft:golden_apple.
Pepe