How to Ban and Unban Players on a Minecraft Server
Someone's griefing your build, spamming chat, or just needs to go. Minecraft has clean built-in commands for kicking and banning, and unbanning is just as easy once you know the right command. This guide covers /kick, /ban, /ban-ip, /pardon, the JSON files behind them, and how to run it all from a hosting panel console.
First, make sure you can run the commands
Ban commands only work if you have permission. You've got two easy ways:
- Run them from the console. The panel console (or your server terminal) always has full permission, so you don't type a slash. Just
ban PlayerName griefing. - Op yourself in-game. From the console run
op YourName, then you can type/banetc. in chat.
On FreaksMC the live console is right in the panel, so you can ban someone from your phone without even launching the game.
Kick vs ban - which do you want?
/kickremoves a player right now but they can rejoin immediately. Good for a warning, or to boot someone who's lagged/stuck. Example:/kick PlayerName Take a break./banremoves them and blocks their account from rejoining until you pardon them. This is the permanent option.
There's no built-in "temp ban for 3 days" in vanilla. If you want timed bans, that's a plugin job (EssentialsX and similar add /tempban).
Banning a player by name
/ban PlayerName reason goes here
The reason is optional but shows up in the ban message and is worth adding so future-you remembers why. Example:
/ban Steve repeated griefing after warning
The player is kicked immediately and can't rejoin. Their name goes into banned-players.json.
See who's banned
/banlist
Lists every banned account. Use /banlist ips to see banned IP addresses.
Banning by IP address
If someone keeps coming back on new accounts, ban the address instead of (or as well as) the name:
/ban-ip 203.0.113.45 reason
You can also ban a currently-online player's IP by name:
/ban-ip PlayerName ban evasion
Be careful with IP bans. Players on the same home network (siblings, roommates) share an IP, and many players have dynamic IPs that change, so an IP ban can miss the target and catch innocents. Use it for persistent offenders, not first-timers.
Unbanning a player
To reverse a name ban:
/pardon PlayerName
To reverse an IP ban:
/pardon-ip 203.0.113.45
That's it - they can join again right away, no restart needed.
The files behind the commands
Every ban is stored in JSON files in your server's root folder. You normally don't need to touch these, but they're useful to know:
banned-players.json- name/UUID bans.banned-ips.json- IP bans.ops.json- who has operator status.whitelist.json- approved players (see below).
You can unban someone by editing banned-players.json in the file manager, removing their entry, and restarting - but /pardon in the console is faster and safer since it won't leave broken JSON. Only hand-edit these if a name is misspelled or the file got corrupted.
Prevention beats banning: use the whitelist
If your server is for friends only, the whitelist stops strangers from ever joining, so you rarely need to ban anyone.
Turn it on:
/whitelist on
/whitelist add FriendName
/whitelist listshows who's approved./whitelist remove Namedrops someone./whitelist offopens the server back up.
You can also set white-list=true in server.properties (editable right in the FreaksMC panel file manager). With enforce-whitelist=true, anyone not on the list gets kicked the moment you enable it, even if they're already online.
Quick reference
| Goal | Command |
|---|---|
| Warn/temporarily remove | /kick Name reason |
| Permanent ban | /ban Name reason |
| Ban an address | /ban-ip 1.2.3.4 reason |
| Unban by name | /pardon Name |
| Unban an address | /pardon-ip 1.2.3.4 |
| See bans | /banlist |
| Lock server to friends | /whitelist on + /whitelist add Name |
Remember: from the panel console you drop the leading slash; in-game as an op you keep it.
Moderate from anywhere
FreaksMC gives you a live console and file manager in the panel, so you can ban, pardon, and manage the whitelist from your phone or laptop - founder-run human support if you get stuck. Plans from $3/mo with a 24-hour money-back guarantee.
See plansWant a server that just runs fast?
FreaksMC runs on NVMe hardware with performance-tuned defaults baked in - pre-optimized Paper, sane view distances, and one-click world pre-generation. Set up in 60 seconds.
See plans from $3/mo