Ban Players From Your Minecraft Server
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.
/ban <targets> [<reason>]/ban <targets> [<reason>]| Argument | Type | What it means |
|---|---|---|
<targets> | player | The username of a player or a target selector that matches one or more players. |
<reason> | message | An optional free text message explaining the ban, which can include selectors that get replaced by names. |
/ban SteveBans the player named Steve without giving a specific reason.
/ban Alex Breaking server rulesBans the player named Alex and sets the ban reason to Breaking server rules.
/ban @p[distance=..5] Entering a restricted areaBans the nearest player within 5 blocks and records the reason for the ban.
/ban @a[tag=cheater] Removed for having the cheater tagBans all currently online players who have the cheater tag.
/ban @a[team=Red] The Red team is disqualifiedBans every online player currently on the Red team with an explanation.
/ban @r[gamemode=adventure] Selected by the random ban rouletteBans one random player who is currently in Adventure mode.
/ban GriefKing Caught stealing items from @pBans the player GriefKing and automatically replaces the selector in the reason with the nearest player's name.
Measured from the game files of every Java release from 1.13 to 26.3.
Minecraft Bedrock Edition does not have a /ban command, as this command is exclusive to Java Edition.
You must be a server admin with at least permission level 3 to run the /ban command in Minecraft Java Edition.
No, the [<reason>] argument is optional, so you can simply type /ban followed by the player's name.
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.
/ban-ip/banlist/datapack/deop/fetchprofile/kick/list/op/pardon/pardon-ip/publish/reload/save-all/save-off/save-on/setidletimeout