Ban a player
/ban SteveSteve is disconnected if online and can no longer join.

/ban blocks a player from joining the server for good, with an optional reason shown on their screen. It is a dedicated server command, used from the console or by operators with level 3 or more. A banned player who is online is disconnected at once.
/ban <targets> [<reason>]// Only on a dedicated server: the command does not exist in single player or in a world opened to LAN.
| Argument | Expects | What it does |
|---|---|---|
| targets | Player name | Name, UUID or selector of the player; an offline player works if you type the exact name. |
| reasonoptional | Message | Optional free text shown to the player and saved in the ban list, for example Griefing at spawn. |
/ban SteveSteve is disconnected if online and can no longer join.
/ban Steve Griefing at spawnThe reason appears on Steve's screen and in the ban list.
/banlist playersLists every banned account with who banned it and why.
/pardon SteveSteve can join the server again.
Fill in the fields, then copy the command.
Command generatorThe ban is tied to the account, not to the name you typed, so a name change does not get around it. It is saved in banned-players.json and survives restarts. When the player tries to connect, the screen says You are banned from this server. followed by your reason. You can ban someone who is offline by typing the exact name. There is no duration: a ban lasts until you lift it with /pardon.
Nothing changed. The player is already banned means the account is already on the list, which you can check with /banlist. In singleplayer and LAN worlds, /ban does not exist; there, /kick is the only way to remove a guest.
✓ Checked in Java Edition 26.3 · updated 2 November 2026
Not in vanilla Java Edition. A ban lasts until an operator runs /pardon; timed bans need a plugin or a mod.
Yes, a ban only blocks one account. If the same person keeps returning, /ban-ip blocks their address, and a whitelist blocks everyone who is not invited.
On a server, as an operator or from the server console: /ban <targets> [<reason>]. It does not exist in single player.
Server operator, level 3. Only on a dedicated server: the command does not exist in single player or in a world opened to LAN.
/pardonServer/banlistServer/kickServer/ban-ipServer/pardon-ipServer/whitelistServer/stopServer/save-allServer