Skip to main content

/ban

Bans a player from the server. Banned players cannot connect until unbanned.

Category
Server
Permission Level
Admin
Version Added
1.0

Overview

Bans a player from the server. Banned players cannot connect until unbanned. In vanilla Minecraft Java Edition it is one of the server commands and has been available since version 1.0.

It is invoked as /ban [] and accepts one required argument () and one optional argument ([reason]).

Bans persist across server restarts. Use /pardon to unban. For IP-based bans, use /ban-ip. The ban list is stored in banned-players.json.

/ban targets the account; a player can return from a different account unless you use /ban-ip. Use /pardon to lift a ban.

Syntax & Arguments

/ban <targets> [<reason>]

The full syntax is /ban []. Angle brackets < > mark required arguments and square brackets [ ] mark optional ones; a vertical bar | between words means you pick exactly one of those literals. You must always supply . The argument [reason] may be omitted, in which case the documented default applies.

targets
Required, of type a game_profile. The player to ban.
reason
Optional, of type a message. The reason for the ban, displayed to the banned player.

Parameters

NameTypeRequiredDescription
targetsgame_profileRequiredThe player to ban.
reasonmessageOptionalThe reason for the ban, displayed to the banned player.

Examples

The 2 examples below are ready to copy and adapt. For instance, /ban Steve Griefing bans Steve from the server with the reason "Griefing". Each example varies the arguments to show a different real use of /ban; read the note under every snippet to see exactly what changes.

/ban Steve Griefing

Bans Steve from the server with the reason "Griefing".

/ban Griefer123

Bans the player Griefer123 with no specific reason.

Permission Level & Requirements

/ban sits at permission Level 3 - Admin, which means it needs permission level 3 (administrator).

Requires level 3. The ban list lives in banned-players.json and persists across restarts.

This reference describes the Java Edition 1.21 form of the command; Bedrock Edition may use slightly different argument formats.

Common Mistakes

Notes

Bans persist across server restarts. Use /pardon to unban. For IP-based bans, use /ban-ip. The ban list is stored in banned-players.json.

Related Commands

If /ban is part of your toolkit, the commands below are the ones you will most often reach for alongside it: /kick, /whitelist, /op, and /deop. They cover closely related tasks, so the links above jump straight to each one.

Frequently Asked Questions about /ban

What does the /ban command do in Minecraft?

Bans a player from the server. Banned players cannot connect until unbanned. It belongs to the server command group and was added in Java Edition 1.0.

What is the correct syntax for /ban?

/ban []. The required argument is targets, and the optional one is reason.

What permission level does /ban need?

It requires permission Level 3 - Admin. On a server the player must be an operator at that level, or have cheats enabled in single-player.

What is a common mistake when using /ban?

Using /ban instead of /ban-ip, players can rejoin with an alternate account unless IP-banned.

Can you give an example of /ban in use?

Yes. /ban Griefer123 — bans the player Griefer123 with no specific reason.

Need a Minecraft server?

Try these commands on Astroworld or host your own server.

Try Astroworld Hosting