Ban a Player from the Server
Permanently ban a player from your server. Run: `/ban PlayerName Reason here`. Permanently bans a player from the server. The reason is optional but displayed when they try to rejoin. Related commands: /ban-ip <address> to ban by IP, /pardon PlayerName to unban, /banlist to view all current bans. Java Edition stores bans in banned-players.json. Works on Java 26.2 and Bedrock 26.32. Last verified June 2026.
✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026/ban PlayerName Reason here- Java: yes
- Bedrock: yes
- Command block: no
- Needs cheats / OP: yes
How to use
- From chat or the server console: /ban PlayerName optional reason.
- The player is immediately kicked and cannot rejoin.
- Use /pardon PlayerName to lift the ban.
Frequently asked questions
Does Ban a Player from the Server work on Bedrock Edition?
Yes -- the same command works on both Java 26.2 and Bedrock 26.32.
Do you need OP or cheats enabled to use Ban a Player from the Server?
Yes -- you need operator permissions (OP) on a server, or cheats enabled in your world settings (Java: open to LAN with cheats on; Bedrock: enable cheats in world settings).
Can Ban a Player from the Server be used in a command block?
No -- this command can only be run from the chat window, not from a command block.
Does Ban a Player from the Server work in multiplayer?
Yes -- the command works the same in multiplayer as in singleplayer. Operator permissions may be required depending on your server settings.
Related commands
Add Player to Whitelist
Whitelist a player so they can join the server
Give a Player OP
Grant operator permissions to a player
God Mode (Resistance + Regeneration)
Become nearly invincible
Set Gamemode to Creative
Switch yourself into Creative mode
Kill All Mobs
Instantly remove every mob from the world except players
Add Experience Levels
Give yourself XP levels for enchanting
Need something different?
Customize this command in the /execute builder — choose your own options and copy the result.
Learn more
📖Minecraft Commands Not Working -- How to Fix
Troubleshooting guide for Minecraft commands that show errors or do nothing -- covers cheats off, wrong edition, syntax errors, OP permissions, and version changes.