Short answer for how to ban someone on a Minecraft server on Java: run /ban PlayerName from the server console, or in game as an op. Add a reason after the name if you want one. On Bedrock there's no /ban at all, so you kick and keep an allowlist instead. Details for both below.
ban PlayerName Griefing the spawnbanlist playerspardon PlayerName
If you only want a friend gone for a minute, that's a kick, not a ban. And if you're stuck on the permissions side, my guide to opping yourself on a server covers it.
Ban a player on Java
The Java ban commands are /ban, /ban-ip, /banlist, /pardon and /pardon-ip. All of them need permission level 3 and only work on a dedicated server. The console runs at full permission, so that's the easiest place to type them.
The syntax is /ban <targets> [<reason>]. A few things to know, per the Minecraft Wiki as of Java 26.3:
- The target is a player name or a player selector. On an online-mode server, use the real account name.
- The reason can have spaces in it. Leave it out and it defaults to
Banned by an operator. - The banned player sees the reason, and so do other operators and the server log.
- The ban sticks to the player's profile UUID, not just the name they typed.
A ban beats a whitelist too. Someone who's banned stays out even if they're on it. If you run a private server, my whitelist guide is the better first line of defence, and bans are for the cleanup.
To see who's on the list, run /banlist. It takes players or ips if you only want one of them.
Kick vs ban
A kick boots the player and that's all. Nothing stops them rejoining, so if a kicked friend can't get back in, the kick isn't what's keeping them out. /kick exists on both editions. On Java it's /kick <targets> [<reason>] and needs level 3. On Bedrock it needs level 1 and takes one player at a time. If you want someone gone for good, you need a ban or an allowlist, not a kick.
And if the troublemaker is an op, take that away before anything else. Level 3 is all it takes to run /pardon, so any op you leave in place can undo your ban. An r/aternos owner learned that the hard way after sharing their login with a friend.
Can you IP ban someone on Minecraft?
Yes, on Java. /ban-ip <target> [<reason>] takes either an IP address or the name of a player who's online right now, and it stops anyone connecting from that address. Same default reason as /ban.
One hard limit: the target has to be a single word of letters, digits and - + . _, so you can't IP-ban an IPv6 address this way. The wiki points at Mojira report MC-97885 for that. My take: ban the account first with /ban, since that follows the UUID, and use /ban-ip when you've got an actual IPv4 address you want blocked. To find the addresses already banned, use /banlist ips.
How to unban someone in Minecraft
Two commands, both level 3 and dedicated-server only:
| Command | What it does |
|---|---|
/pardon <targets> | Removes a player's profile from the ban list. |
/pardon-ip <address> | Removes an IP address. It has to be an IP address, not a name. |
Bans on Java live in banned-players.json in the server folder, and the wiki says you can unban by deleting the entry from that file by hand too. The command is safer. If an old guide tells you to use /unban or /banip, those are gone. /banip became /ban-ip way back in Alpha.
Bedrock servers: there's no /ban
This trips up a lot of people. Type /ban on a Bedrock Dedicated Server and you get an unknown-command error, because the ban commands are Java-only. The Bedrock command and file lists on the wiki have allowlist, permission, ops and kick, and no ban command or ban list file.
What to do instead:
- Kick them with
/kick. It takes one player at a time, by name, selector or XUID. - Run an allowlist so they can't walk back in. Only people you've added can join, which works as a ban for everyone else. The steps are in my whitelist guide (Bedrock calls it the allowlist).
- Check their permissions. Bedrock keeps player roles in
permissions.json, so make sure the troublemaker isn't an operator in there. - Look at community loaders if vanilla isn't enough. LeviLamina and Endstone are the active ones the wiki lists, LiteLoaderBDS and BDSX are defunct as of 2024, and none of it is supported by Mojang. Plugin support on BDS is poor in general, so check a loader's own docs for moderation tools before you count on it.
Starting from nothing? My Bedrock server guide covers the install. One more Bedrock catch: the host of a world can't be kicked, and neither can a player in a single-player world.
Bedrock Realms: remove vs block
The Realms Hub is Bedrock-only, and it gives you two options per player. Go to the Realms Hub, open Community, then Members. Next to each player, owners and administrators can choose:
- Remove takes away their access to the Realm and the Realms Hub. They can still come back with a valid invite link.
- Block does the same and also stops them rejoining with an invite link.
For a troublemaker, block. Blocked players are hidden from the members list by default, so use the Blocked filter to find them, and you can unblock from there. Only the owner can remove or block administrators, and the owner can't be kicked. The menus are changing as Mojang redesigns the Realms Hub, so if a button has moved, look for Members.
Aternos
On a Java server, the Aternos console takes the same commands as above: start the server, open the console and run /ban name reason. Aternos also has two panel pages, Banned players and Banned IPs, under Players. You can unban from either, or from the console while the server's online with /pardon name or /pardon-ip address. Run /banlist ips in the console if you need the address to pardon. A Bedrock server on Aternos still has no /ban, so lean on the allowlist there. More on the host in is Aternos safe.
LAN worlds
If you opened a single-player world to LAN, you don't have a dedicated server, and the ban commands are restricted to dedicated servers. You also can't kick the LAN host. Since Java 1.20.3, /kick no longer kicks the host of a LAN world. If you need real bans, run a proper server.
Plugins
Vanilla bans are blunt. /ban has no duration setting, so a ban lasts until someone pardons it. If you want more control than that, plugins are where to look. My rundown of the best Minecraft server plugins covers what a small server actually needs.
So, how do you ban someone?
Java: /ban name reason, then /pardon name if you change your mind. Bedrock: kick plus an allowlist, and on a Realm hit Block, not Remove. Level 3 on Java, and the console always has it.
Hosting something of your own?
Folly is a free multiplayer voxel game for PC, coming soon in early access, with no purchases required. Player-hosted servers are planned for early access, but they haven't shipped yet. The plan is on the host and create page.