/ban Command in Minecraft Java Edition

Ban Players From Your Minecraft Server

Java EditionServer AdminPermission: Level 3

The /ban command in Minecraft Java Edition allows server admins to block specific players from joining or staying on a server. You can ban a single player by name or multiple players at once using a target selector, and you can optionally attach a text message explaining why they were banned.

Server admins with permission level 3 use this command to moderate multiplayer worlds and remove players who break the rules. This command has been available in Java Edition since at least version 1.13 and works up to the latest 26.3 release.

Syntax (Java 26.3, 1 form)

  1. /ban <targets> [<reason>]

The forms you will use most

/ban <targets> [<reason>]
Bans one or more targeted players from the server with an optional text message explaining the reason.

Arguments

ArgumentTypeWhat it means
<targets>playerThe username of a player or a target selector that matches one or more players.
<reason>messageAn optional free text message explaining the ban, which can include selectors that get replaced by names.

Examples

Version history

Measured from the game files of every Java release from 1.13 to 26.3.

  1. 1.13 Already in the game in 1.13, the oldest Java version we track.

Tips

Common mistakes

Java vs Bedrock

Minecraft Bedrock Edition does not have a /ban command, as this command is exclusive to Java Edition.

FAQ

Who has permission to use the /ban command?

You must be a server admin with at least permission level 3 to run the /ban command in Minecraft Java Edition.

Is the reason required when banning a player?

No, the [<reason>] argument is optional, so you can simply type /ban followed by the player's name.

Can I ban multiple players at the same time?

Yes, by using a player selector like @a with specific filters in the <targets> argument, you can ban everyone who matches your selector at once.

Related commands

/ban-ip/banlist/datapack/deop/fetchprofile/kick/list/op/pardon/pardon-ip/publish/reload/save-all/save-off/save-on/setidletimeout

More on 9Minecraft