How to Ban and Unban Players on Your Minecraft Server

Ban, unban, and manage banned players on your Minecraft Java server. Includes username bans, IP bans, and editing banned-players.json.

Banning removes a player and prevents them from rejoining. Minecraft supports two ban types: username bans (most common) and IP bans (catches alt accounts from the same connection).

Ban a Player

Open the Console

In the XGamingServer Panel, click Console in the sidebar.

Run the ban command

ban PlayerName Reason for the ban

The reason is optional but recommended — it's shown to the player when they try to reconnect.

If you have OP permissions, you can ban from in-game chat:

/ban PlayerName Toxic behavior in chat

Unban a Player

pardon PlayerName

The player can immediately reconnect.

IP Bans

For repeat offenders who keep making new accounts, ban their IP address instead:

ban-ip 123.45.67.89 DDoS attempts

Or ban by username (the server looks up their last known IP):

ban-ip PlayerName Multiple alt accounts

To unban an IP:

pardon-ip 123.45.67.89

Tip: Banning by username is preferred for normal cases. IP bans catch alt accounts from the same connection, but they also block legitimate players sharing that IP (e.g., siblings on the same home network, university dorms).

Command Reference

CommandDescription
ban <player> [reason]Ban a player by username
ban-ip <ip|player> [reason]Ban an IP address
pardon <player>Unban a player by username
pardon-ip <ip>Unban an IP address
banlist playersView all banned players
banlist ipsView all banned IP addresses
kick <player> [reason]Kick (temporary, can rejoin immediately)

Edit Ban Files Directly

Ban lists are stored as JSON files in your server root:

FileContents
banned-players.jsonUsername bans
banned-ips.jsonIP address bans

You can edit these directly via Files in the panel:

[
  {
    "uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
    "name": "BadActor",
    "created": "2026-01-15 12:34:56 +0000",
    "source": "AdminName",
    "expires": "forever",
    "reason": "Griefing spawn"
  }
]

After editing, use banlist players in the Console to verify, or restart the server.

Temporary Bans

Vanilla Minecraft doesn't support temporary bans natively — bans are always permanent until manually removed. For tempbans, install a plugin:

  • EssentialsX/tempban <player> <duration> <reason> syntax
  • LiteBans — Advanced ban management with web UI
  • AdvancedBan — Tempbans, mutes, warnings, kicks

Best Practices

PracticeWhy
Always include a reasonThe reason is shown to the banned player and helps with appeals
Use username bans by defaultCleaner — IP bans catch innocent users on shared connections
Document bans externallyKeep a Discord channel or spreadsheet of bans with dates and reasons
Warn before banningFor minor offenses, kick first with a warning

How is this guide?

40% Off — Limited TimeGet your Minecraft server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page