Skip to content
Sign inStart a server

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

Type commands into the server console as they are, or into the game's chat with a / 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.

Minecraft Java whitelist commands
CommandWhat 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 listWhat it doesShows everyone on the list
whitelist offWhat it doesOpens the server to anyone who has the address
whitelist onWhat it doesTurns the list back on
whitelist reloadWhat 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

Minecraft Java commands to kick, ban and unban players
CommandWhat it does
listWhat 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
banlistWhat it doesShows everyone who is banned
ban-ip <address>What it doesBans an IP address

Running the world

Everyday Minecraft Java server commands
CommandWhat it does
say <message>What it doesShows a message to everyone online
save-allWhat it doesSaves the world to disk now
stopWhat it doesSaves and shuts the server down
time set dayWhat it doesJumps to morning. time set night does the opposite
weather clearWhat 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
seedWhat 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.

Common Minecraft Java game rules under their current names
ToTypeDefault
Turn off player-against-player damageTypegamerule pvp falseDefaulttrue
Keep items and experience on deathTypegamerule keep_inventory trueDefaultfalse
Stop monsters spawningTypegamerule spawn_monsters falseDefaulttrue
Stop creepers and other mobs changing blocksTypegamerule mob_griefing falseDefaulttrue
Freeze the time of dayTypegamerule advance_time falseDefaulttrue
Freeze the weatherTypegamerule advance_weather falseDefaulttrue
Let half the players skip the night by sleepingTypegamerule players_sleeping_percentage 50Default100
Close the Nether portalsTypegamerule allow_entering_nether_using_portals falseDefaulttrue
Switch command blocks offTypegamerule command_blocks_work falseDefaulttrue

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:

server.properties settings that are game rules in Minecraft 26.x
Old line in server.propertiesGame rule now
pvpGame rule nowpvp
spawn-monstersGame rule nowspawn_monsters
allow-netherGame rule nowallow_entering_nether_using_portals
enable-command-blockGame 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.

Related guides