Server commands

The commands you really need to manage a Minecraft Java 26.3 server: who can join, backups, time, world rules. These are the same ones we use on our test server. Have an older version? Pick it: commands that do not exist there disappear and world rules take the names they had back then.

From in-game chat commands start with / and they only work if you are an operator (op). From server console, the window where the server runs, you type them without / and they always work. Choose below where you write them: the commands adapt.

Tap a command to copy it. The colored parts are the player's name.

Permissions and access

Who can join the server and who can use commands.

Makes the player an operator: can use all commands. Give it only to someone you trust.

Removes operator permissions.

Turns on the whitelist: only people on the list can join. It is the simplest way to keep a server among friends.

Adds a player to the whitelist. The name must be spelled correctly, but upper and lower case don't matter.

Removes a player from the whitelist. If it is already inside, it stays until it leaves.

Shows who is on the whitelist.

Turns off the whitelist: anyone who knows the address can join.

Shows who is online right now.

Kicks the player out with a message. It can come right back in.

Bans the player: can no longer get in.

Removes the ban.

Bans the player's IP address, so they can't rejoin with another account.

Shows all banned players and IPs.

Server management

Save, stop, make backups and talk to the players.

Saves the world to disk right away.

Risk-free backup, step 1: pauses automatic saving, so the files do not change while you copy them.

Step 2: writes everything to disk and waits until it is done. Now copy the world folder (usually world).

Step 3, after the copy: turns automatic saving back on. Don't forget it.

Saves and stops the server. Always use it instead of closing the window.

Writes a chat message to everyone.

Like say, but without the name in front and with the color you want.

Private message to a player.

Changes the difficulty: peaceful, easy, normal o hard. In Peaceful, monsters don't spawn and many farms stop working.

Kicks out anyone standing still for 30 minutes. 0 turns it off.

Shows the world's seed.

Shows the server version: useful to know which farms work.

Reloads the data packs without restarting the server.

Time, weather and world

Day and night, rain, respawn point, borders.

Stops the rain.

Thunderstorm: useful for charged creepers and for tridents.

Sets the world's respawn point where you are (from chat).

Sets the player's respawn point where they are standing, without a bed.

World border 10.000 blocks wide: the world does not grow endlessly and the folder stays small.

Sets the center of the border where you are.

Always keeps the chunk you are in loaded, even if no one is there: the farm in there always works.

Shows the chunks kept loaded.

Stops keeping all the chunks loaded.

The coordinates of the nearest village. Others: minecraft:stronghold, minecraft:ancient_city, minecraft:trial_chambers.

The coordinates of the nearest biome.

Helping a player

Teleports, items, game modes.

Takes you to the player.

Teleports the player to you.

Teleports the player to coordinates (x, y, z).

Gives 64 oak logs. You can find block names in the block catalog: one tap and you copy them.

With 0 at the end it removes nothing: counts how many ingots the player has.

Clears your whole inventory. There's no going back.

Night Vision forever, without particles. You remove it with effect clear.

Removes all effects.

Gives 30 experience levels.

Enchants the item the player is holding, up to the normal maximum level.

Building with commands

Fill, empty, copy. At most 32.768 blocks per command.

Places a block where you are.

A 11×11 floor under your feet.

Clears everything around you: useful for leveling.

Removes only the water, leaves the rest.

A glass box, empty inside.

Copies the area between the first two corners and pastes it starting from the third point.

Grows a tree where you are. Others: minecraft:birch, minecraft:spruce, minecraft:cherry.

Spawns a villager.

A zombie that never despawns: what you need for the iron farm.

Try out a farm

How we measure farms on our server: time speeds up, items are counted.

Shows how fast the server is running. Normal: 20 ticks per second.

Makes a game day (20 minutes) pass as fast as possible, then goes back to normal. The fastest way to see how much a farm produces.

Stops the acceleration.

Freezes the world: mobs, redstone and plants stop. Players still move.

With the world frozen, advance by 20 ticks (one second): to watch the redstone step by step.

Unfreezes the world.

Clears all items on the ground. Removes lag after a test.

Clears the experience orbs on the ground.

World rules (gamerule)

They change how the world works. They apply to everyone until you set them back to the normal value.

When you die, you keep your inventory and experience.normale: false

It only takes one player sleeping to skip the night, even with many online.normale: 100

No phantoms, even if you don't sleep.normale: true

Creepers don't break blocks and endermen don't pick them up. Warning: villagers stop harvesting and some farms no longer work.normale: true

Fire doesn't spread and doesn't burn wooden houses. Until 1.21.10 it was doFireTick false.normale: 128

Time stops: it always stays at the time you turn it off.normale: true

The weather no longer changes on its own.normale: true

Mobs no longer spawn on their own. Mob farms and the iron farm stop working.normale: true

No illager patrols.normale: true

No raids in villages. Until 1.21.10 it was the opposite: disableRaids true.normale: true

Players can't hurt each other.normale: true

You respawn right away, without the death screen.normale: false

You respawn exactly at the spawn point instead of at a random spot around it.normale: 10

Growth speed of plants, trees and crops. Raising it throws off the farms' measurements: we leave it at 3.normale: 3

It doesn't write players' advancements in chat.normale: true

Commands no longer respond in chat.normale: true

How many mobs can fit in the same block before they suffocate.normale: 24

server.properties

The text file in the server folder. Open it with Notepad, change the line and restart the server. Next to each line here is the default value you start with.

The message shown in the server list.default: A Minecraft Server

Whitelist on from the start.default: false

If you remove someone from the whitelist, they get kicked out right away.default: false

The maximum number of players at the same time.default: 20

Difficulty: peaceful, easy, normal, hard.default: easy

Mode for new players.default: survival

Players can't hurt each other.default: true

How far you can see, in chunks. Lower = lighter server.default: 10

How far the world works around players, in chunks. A farm farther away than this stops.default: 10

Radius around the spawn where only operators can build. 0 removes it.default: 16

It doesn't kick out anyone who looks like they're flying: needed with some mods and sometimes with fast horses.default: false

Allows using command blocks.default: false

Checks that accounts are genuine. Leave it as true: with false anyone can join with another person's name, even as an operator.default: true

The server port. If you change it, your friends type it after the address, for example myserver.com:25570.default: 25565

The seed of the new world. It only applies when the world is created.default: vuoto

Selectors and coordinates

The parts to put in place of the player name or coordinates.

All online players.

The nearest player.

Who types the command.

A random player.

All entities: players, mobs, items on the ground. Always use it with a filter.

Zombies within 20 blocks of you.

Players within 50 blocks.

The coordinates of where you are. ~ ~1 ~ is one block above you.

Five blocks in front of you, in the direction you're looking.