Minecraft Server Commands: OP, Whitelist and Ban
A guide to Minecraft server commands: OP and permission levels, whitelist, ban and kick, game mode, gamerule, teleporting and stopping the server safely.

Contents
- Console or in-game?
- OP and permission levels
- Whitelist: opening the server only to listed players
- Kick and ban
- Game mode, difficulty and world settings
- Teleporting and giving items
- World border
- Saving and safely stopping the server
- Paper and plugin commands
- Differences on Bedrock servers
- A Minecraft server at Nodesty
Minecraft server commands are the fastest way to manage your server: giving players permissions, opening the server only to your friends, kicking or banning rule breakers and adjusting the world all take just a few commands. In this guide, we've collected the commands a server owner uses most often, along with the related files.
Some commands can only be used from the server console or by players with OP permissions. If you haven't set up your server yet, start with our How to make a Minecraft server guide.
Console or in-game?
- Server console: Commands are typed without a slash:
op Alex. The console always has the highest permission level. - In-game chat: Commands start with a slash:
/op Alex. You need sufficient permissions to use the command.
Pressing Tab after typing a command name completes the command and player names; it's the easiest way to see which options your server version has.
OP and permission levels
OP (operator) gives a player permission to use admin commands:
op Alex
deop Alex
The op-permission-level setting in the server.properties file decides which permission level OPs get:
| Level | What can be done? |
|---|---|
| 1 | Bypass spawn protection |
| 2 | Cheat commands: game mode, teleporting, giving items, gamerule |
| 3 | Player management: kick, ban, op |
| 4 | Server management: all commands, including stop and save-all |
The default level is 4. The OP list is kept in the ops.json file. Only give OP to people you trust completely; for detailed, tiered permissions on Paper or Spigot servers, use a permissions plugin such as LuckPerms.
Whitelist: opening the server only to listed players
When the whitelist is on, only players on the list can join the server. It's the simplest protection for groups of friends and private communities:
whitelist on
whitelist add Alex
whitelist remove Alex
whitelist list
whitelist reload
whitelist off
The related server.properties settings:
white-list=truekeeps the whitelist active every time the server starts.enforce-whitelist=truekicks online players who aren't on the list from the server when the whitelist is turned on or reloaded.
The list is kept in the whitelist.json file. If you edit the file by hand, load the change with whitelist reload.
Kick and ban
kick Alex Please follow the rules
ban Alex Cheating
ban-ip 203.0.113.10
banlist
pardon Alex
pardon-ip 203.0.113.10
kickremoves the player from the server; the player can join again.banpermanently blocks the player by account;pardonlifts the ban.ban-ipblocks an IP address. Since players' IP addresses can change and several people can share the same IP, make an account ban your first choice.
Bans are kept in the banned-players.json and banned-ips.json files. If you're facing constant, automated attacks, the problem is solved at the network level rather than with commands; the details are in our What is DDoS? article.
Game mode, difficulty and world settings
gamemode creative Alex
gamemode survival Alex
difficulty hard
time set day
weather clear
setworldspawn
spawnpoint Alex
The gamerule command changes the rules of the world: whether items are kept on death, the day-night cycle, whether mobs can damage blocks or the percentage of players who need to sleep to skip to morning.
gamerule <rule> <value>
Since rule names can change from version to version, type gamerule and press Tab to list the rules on your server. Rules are saved to the world, so they stay in effect when you restart the server.
Teleporting and giving items
tp Alex Steve
tp Alex 100 64 -200
give Alex minecraft:diamond 5
Coordinates are written in x y z order; the middle y value is the height.
World border
A world that grows forever both fills up the disk and puts load on the server while new chunks are generated. Setting a world border prevents this:
worldborder center 0 0
worldborder set 10000
This example draws a border centered on 0, 0 with sides 10,000 blocks long. For pre-generating the world and other performance settings, take a look at our Minecraft server lag guide.
Saving and safely stopping the server
list
say Server restarts in 5 minutes
save-all
stop
listshows the players online.saysends a message to all players.save-allsaves the world to disk.stopsaves the world and shuts the server down cleanly.
Always shut the server down with stop; force-killing the process can lose changes made since the last save and corrupt the world files. Don't forget to back up your world regularly either; the details are in our Server backups guide.
Paper and plugin commands
On Paper and Spigot servers, a few extra commands come in handy:
plugins(plfor short): Lists the installed plugins. Plugins shown in red failed to load; check the server log.version: Shows the server software and its version.tps: Shows the server's TPS over the last 1, 5 and 15 minutes; 20 is the ideal value.
To use plugin commands, players need the permission the plugin requires. Instead of reloading the server with the reload command, restart it; reload causes errors with many plugins.
Differences on Bedrock servers
Most commands are the same on Bedrock Dedicated Server, but there are some differences; for example, it uses allowlist (allowlist add Alex) instead of whitelist. We cover setting up a Bedrock server in our How to make a Minecraft Bedrock server guide.
A Minecraft server at Nodesty
Nodesty Minecraft server hosting plans run in Frankfurt on an AMD Ryzen 9 9950X processor reaching 5.7 GHz, with NVMe storage and DDoS protection. You can get started with Paper, Forge or Fabric in minutes and manage your server with full admin access using the commands in this guide. Daily backups on game servers are free and kept for 7 days.
Minecraft is a trademark of Mojang AB. Nodesty is not affiliated with or endorsed by Mojang or Microsoft.
Frequently Asked Questions
How do I give myself OP on a Minecraft server?
In the server console, type op followed by your player name, without a slash. You already need to be OP to give OP from inside the game, so the first OP is always given from the server console.
I turned on the whitelist but players can still join. Why?
The whitelist only blocks new logins; players who are already on the server when you turn it on aren't kicked. If you set enforce-whitelist=true in the server.properties file, players who aren't on the list are kicked from the server when the whitelist is turned on or reloaded.
Should I put a slash in front of commands in the console?
You don't need a slash in the server console; you type the command directly. In the in-game chat window, every command starts with a slash.
Why don't plugin commands work?
Plugin commands only work on servers that support plugins, such as Paper or Spigot, and you can check that the plugin has loaded with the plugins command. If the command exists but players can't use it, they haven't been given the permission the plugin requires; manage permissions with a plugin such as LuckPerms.
How do I unban a banned player?
You lift a ban given by player name with the pardon command and a ban given by IP address with the pardon-ip command. You can list banned players with the banlist command.
Are the commands the same on a Bedrock server?
Most of the basic commands are the same, but there are some differences. For example, Bedrock Dedicated Server uses allowlist instead of whitelist. Check the commands for your server version by completing them with Tab or using the help command.
About the author
Nodesty Team · Infrastructure & Support
The Nodesty team runs our servers, network and DDoS protection day to day and answers customer support requests around the clock. These guides come from that work.
Related articles

Minecraft server.properties Explained: The Key Settings
Minecraft server.properties explained: where the file is, how to edit it safely and what to set for gameplay, world, whitelist, network and performance.

How to Install Plugins on a Minecraft Server (Paper, Spigot, Purpur)
How to install Minecraft plugins on a Paper, Spigot or Purpur server: safe downloads, versions and dependencies, the plugins folder, updates and errors.

LuckPerms Guide: Ranks and Permissions on a Minecraft Server
A LuckPerms guide for Paper servers: installation, groups and inheritance, prefixes, temporary ranks, promotion tracks, the web editor and storage options.