The most useful Minecraft server admin commands

Players and permissions · updated 28 November 2026

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.

Admin commands typed in the Minecraft server console and the server replies
Server replies to time set, gamemode, whitelist add and weather clear

Players

CommandWhat it does
op Nick / deop Nickgives and removes OP
gamemode creative Nickchanges the game mode (survival, creative, adventure, spectator)
tp Nick1 Nick2teleports a player to another player
tp Nick 100 64 -200teleports to the X Y Z coordinates
give Nick diamond 64gives an item
clear Nickclears the inventory
kill Nickkills the player
xp add Nick 30 levelsadds 30 levels of experience
effect give Nick minecraft:speed 60 1gives an effect for 60 seconds
spawnpoint Nicksets the player's respawn point where they stand

Moderation

CommandWhat it does
listshows who is online
kick Nick Reasonkicks the player from the server
ban Nick Reason / pardon Nickbans and unbans (details)
ban-ip Nickbans the player's IP address
whitelist on / whitelist add Nickturns on the whitelist and adds a player (whitelist)

World

CommandWhat it does
time set day / time set nightsets the time of day
weather clearstops rain and thunder
difficulty hardchanges the difficulty
setworldspawnsets the world spawn where you stand (in game)
seedshows the world seed
worldborder set 5000a world border 5000 blocks wide
locate structure minecraft:village_plainsshows 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

CommandWhat it does
say Messagea server announcement in the chat
save-allsaves the world to disk
stopshuts the server down safely
pluginslists plugins (Paper, Purpur)
tpsshows server performance (Paper, Purpur)

Selectors: @a, @p, @r, @s

Instead of a name you can use a selector:

  • @a - all players, for example give @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 example gamemode Nick creative instead of gamemode creative Nick.
  • Unknown item - item names are in English with underscores, for example golden_apple.
Tip: press Tab while typing a command in game. The game suggests what comes next and marks the mistake in red.

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.