Settings · 7 min read
Minecraft server commands for owners
The commands a Minecraft Java server owner uses: whitelist, op, kick, ban and the game rules under their 26.x names, such as pvp and keep_inventory.
Last checked
Short answer
/ in front once you are an operator. The first three an owner needs are whitelist add <name> to let a friend in, op <name> to give someone the commands in the game, and gamerule <rule> <value> to change how the world behaves. Game rules were renamed in 1.21.11, so keepInventory is now keep_inventory.Console or chat
The server console takes every command, with no slash: list, not /list. It is the window the server runs in on your own PC, or the console page in a host's panel.
In the game, open chat and put a slash first: /list. Most commands there are for operators only, so make yourself one from the console first. This page writes commands the console way.
Who can join: the whitelist
Since Minecraft 26.3 a new server starts with the whitelist on, so only the players you add can join.
| Command | What it does |
|---|---|
whitelist add <name> | What it doesLets that player join. They can be offline when you add them. The console answers Added <name> to the whitelist |
whitelist remove <name> | What it doesTakes them off the list |
whitelist list | What it doesShows everyone on the list |
whitelist off | What it doesOpens the server to anyone who has the address |
whitelist on | What it doesTurns the list back on |
whitelist reload | What it doesReads whitelist.json again, for when you edited the file by hand |
Use the player's Minecraft name. Operators can always join while the whitelist is on, listed or not.
Operators
An operator can run commands from inside the game. op <name> makes one, and the console answers Made <name> a server operator. deop <name> takes it away again.
How much an operator can do is set by op-permission-level in server.properties, from 0 to 4. The default is 4, which is everything, stop included. So give operator status to people you would trust with the whole server, or lower the level: kicking, banning and the whitelist need level 3, and game rules, game modes and teleporting need level 2. server.properties explained covers the file.
Kick and ban
| Command | What it does |
|---|---|
list | What it doesShows who is online |
kick <name> [reason] | What it doesDisconnects the player. They can join again straight away |
ban <name> [reason] | What it doesDisconnects the player and keeps them out until you pardon them |
pardon <name> | What it doesLifts a ban |
banlist | What it doesShows everyone who is banned |
ban-ip <address> | What it doesBans an IP address |
Running the world
| Command | What it does |
|---|---|
say <message> | What it doesShows a message to everyone online |
save-all | What it doesSaves the world to disk now |
stop | What it doesSaves and shuts the server down |
time set day | What it doesJumps to morning. time set night does the opposite |
weather clear | What it doesClears the sky. rain and thunder are the other two |
difficulty <level> | What it doespeaceful, easy, normal or hard |
gamemode <mode> <name> | What it doesPuts one player in survival, creative, adventure or spectator |
defaultgamemode <mode> | What it doesSets the mode new players start in |
tp <name> <other name> | What it doesMoves the first player to the second |
seed | What it doesShows the world's seed |
Game rules, with their 26.x names
A game rule changes how the world behaves. The command is gamerule <rule> <value>. Leave the value off to see the current setting.
| To | Type | Default |
|---|---|---|
| Turn off player-against-player damage | Typegamerule pvp false | Defaulttrue |
| Keep items and experience on death | Typegamerule keep_inventory true | Defaultfalse |
| Stop monsters spawning | Typegamerule spawn_monsters false | Defaulttrue |
| Stop creepers and other mobs changing blocks | Typegamerule mob_griefing false | Defaulttrue |
| Freeze the time of day | Typegamerule advance_time false | Defaulttrue |
| Freeze the weather | Typegamerule advance_weather false | Defaulttrue |
| Let half the players skip the night by sleeping | Typegamerule players_sleeping_percentage 50 | Default100 |
| Close the Nether portals | Typegamerule allow_entering_nether_using_portals false | Defaulttrue |
| Switch command blocks off | Typegamerule command_blocks_work false | Defaulttrue |
Older guides use different names, for two reasons. Minecraft 1.21.11 renamed every game rule from the old mixed-case style to lower case with underscores: doDaylightCycle became advance_time, doWeatherCycle became advance_weather and doMobSpawning became spawn_mobs. And four settings moved out of server.properties to become game rules. Minecraft 26.x ignores the old lines in the file:
| Old line in server.properties | Game rule now |
|---|---|
pvp | Game rule nowpvp |
spawn-monsters | Game rule nowspawn_monsters |
allow-nether | Game rule nowallow_entering_nether_using_portals |
enable-command-block | Game rule nowcommand_blocks_work |
Many modpacks run an older Minecraft, and there it is the other way round. On a server older than 1.21.11 the old names are the ones that work: keepInventory, mobGriefing, doDaylightCycle, doWeatherCycle, doMobSpawning and playersSleepingPercentage. On one older than 1.21.9, the four settings in the table above are still lines in server.properties, not game rules.
On a Galeforce server
We rent Minecraft Java servers. The panel's console takes the commands on this page, with the game rule names that fit your server's Minecraft version, and the everyday ones are buttons:
- The Overview tab has the console, with a command box under it. Its Game commands card sends a message to everyone, saves the world, and sets the time and the weather.
- The Players tab shows who is online. Kick, ban and make admin are there for each player online; ban, unban and make admin also work on a name who is offline.
- The Game tab has the Whitelist switch.
Add friends to the whitelist with whitelist add <name> in the console.
Questions people ask
How do I make myself an operator?
Type op <your Minecraft name> in the server console. After that, commands work for you in the game's chat with a slash in front.
Why does a command from an older guide fail?
Most often it is a renamed game rule. Check the name against the table above, or type gamerule <rule> with no value: a current name answers with its setting. On a server older than 1.21.11, a modpack's for instance, the old names are the right ones.
Does a player have to be online to be whitelisted or banned?
No. whitelist add, ban and pardon all work on a name, so check the spelling.
Checked on 12 November 2026 against Minecraft Java Edition 26.3.