Basic Minecraft commands
The key Minecraft Java server commands: giving operator status, managing players, the whitelist and saving the world.
These are the most-used commands on a plain Minecraft Java Edition server. Plugins add their own commands, such as /fly or /home from EssentialsX. You'll find them described on each plugin's page.
Where to type commands
The client panel is available in Polish only, so its labels are given in Polish with a translation.
- In the game: in chat, with a slash at the start, such as
/gamemode creative. - In the panel console: in the Konsola (Console) tab, also with the slash, such as
/op Steve. The console has every permission.
In the tables, <player> stands for a player's name, and square brackets mark a field you can leave out.
Giving operator status
Most commands require operator status (OP). Give it to yourself from the console:
/op SteveAn operator can use every command in this article. Give OP only to people you trust.
Commands for all players
| Command | What it does |
|---|---|
/help | Shows the list of available commands. |
/list | Shows who's on the server. |
/msg <player> <message> | Sends a private message. /tell and /w work too. |
/me <text> | Sends a description of an action to chat. |
Operator commands: gameplay
| Command | What it does |
|---|---|
/gamemode <mode> [player] | Changes the game mode: survival, creative, adventure or spectator. |
/give <player> <item> [amount] | Gives a player an item, such as /give Steve minecraft:diamond 5. |
/tp <player> | Teleports you to a player. /tp <player> <target> moves one player to another. |
/time set <time> | Sets the time of day: day, night or a number of ticks. |
/weather <weather> | Changes the weather: clear, rain or thunder. |
/difficulty <level> | Changes the difficulty: peaceful, easy, normal or hard. |
/gamerule <rule> <value> | Changes a game rule, such as keeping your inventory after death. The game suggests rule names after you type /gamerule . |
/kill [player] | Kills a player, or you. |
/clear [player] | Clears an inventory. |
/setworldspawn | Sets the world spawn point where you're standing. |
Operator commands: administration
| Command | What it does |
|---|---|
/op <player> | Gives a player operator status. |
/deop <player> | Removes operator status. |
/kick <player> [reason] | Kicks a player from the server. |
/ban <player> [reason] | Bans a player. |
/ban-ip <player or IP> [reason] | Bans an IP address. |
/pardon <player> | Unbans a player. /pardon-ip <IP> unbans an IP address. |
/banlist | Shows the list of bans. |
/whitelist on / /whitelist off | Turns the whitelist, the list of players allowed to join, on or off. |
/whitelist add <player> | Adds a player to the whitelist. |
/whitelist remove <player> | Removes a player from the whitelist. |
/say <message> | Sends an announcement to all players. |
/save-all | Saves the world to disk. |
/stop | Saves the world and shuts the server down. |
Common problems
“Unknown or incomplete command”
The command doesn't exist or is missing a part. Check the spelling and the required fields. Plugin commands work only when the plugin is installed and loaded.
“You do not have permission to use this command”
You don't have operator status. Give it to yourself from the panel console with
/op <your name>.