Minecraft

How to Ban Someone From Your Minecraft Server

The ban command, how to check who is banned, what lives in banned-players.json and how to ban someone for just a day.

TheGameHosting Team 5 min read
Ban a Player in Minecraft
Background: Minecraft © Mojang Studios

To ban player Minecraft server style, open the server console and type ban PlayerName reason. The player is disconnected and can never join again until you lift it, even if they change their username. On TheGameHosting you run it from the panel’s Console, and it takes effect in a second.

This guide covers banning one account: the command, how to check the list, the banned-players.json file and temporary bans. Lifting a ban is in how to unban a player, and kicking or banning by IP address has its own guide: how to kick or IP ban a player.

The ban command, explained

According to the Minecraft Wiki, the Java Edition syntax is:

Code
ban <targets> [<reason>]
  • targets: a player name or a player selector such as @p. With a plain name the player does not need to be online, but on a normal (online-mode) server it has to be a real Minecraft account.
  • reason: optional text the player sees on the disconnect screen. Without it, the reason is “Banned by an operator.”
  • Permission: level 3, so the console or an operator. The command only exists on a dedicated server, not in a single-player world.

The important detail is that the ban is stored against the account’s UUID, not the text of the name. A player who renames their account is still locked out. And a ban beats the whitelist: being whitelisted does not get a banned player back in.

How to ban player Minecraft server side, step by step

  1. Get the exact username. Run list in the console to see who is online, or copy the name from the chat. A typo bans a different account, or fails.
  2. Open the console. In the TheGameHosting panel, pick your server and click Console. The server must be running.
  3. Type the ban without a slash. In the console every command runs with full rights: ban Griefer123 Destroyed spawn.
  4. Read the reply. The console confirms the ban. If the player was online, they are disconnected right away.
  5. Check the list. Run banlist players and look for the name.
  6. Clean up. If the player was an operator, also run deop Griefer123, so they do not keep OP if you pardon them later. Then restore anything they broke from a backup.
Code
list
ban Griefer123 Destroyed spawn
banlist players

From in-game chat it is the same with a slash, /ban Griefer123 Destroyed spawn, as long as you are OP. If chat says you do not have permission, see how to OP yourself on a Minecraft server.

Check who is banned: banlist and banned-players.json

banlist shows every ban. banlist players shows only account bans and banlist ips only IP bans. The server saves account bans in banned-players.json, in the main server folder. An entry looks like this:

Code
[
  {
    "uuid": "a1b2c3d4-...",
    "name": "Griefer123",
    "created": "2026-11-11 18:02:15 +0000",
    "source": "Server",
    "expires": "forever",
    "reason": "Destroyed spawn"
  }
]

On TheGameHosting you can open it from Files in the panel, or download it over sFTP. Use the commands instead of editing it by hand. The server keeps the list in memory and writes it back, so a manual change made while it is running can be lost. If you must edit it, stop the server first.

Temporary bans: only with a plugin

Vanilla Minecraft has no timed ban. ban lasts until someone runs pardon. For a 24-hour or one-week ban, servers running Paper, Spigot or Purpur use a plugin. The most common one is EssentialsX, whose command is:

Code
tempban <player> <datediff> [reason]
tempban Griefer123 1d12h Spamming chat
  • The duration combines units: y, mo, w, d, h, m and s, for example 30m, 7d or 1d12h.
  • EssentialsX writes the temporary ban to the server’s normal ban list with an end date, which is why it shows in banned-players.json with a date in expires instead of forever.
  • Staff need the essentials.tempban permission. To limit how long moderators can ban for, set max-tempban-time in the EssentialsX config.yml; players with essentials.tempban.unlimited skip that limit.

These commands are in the official EssentialsX source. On TheGameHosting you can install EssentialsX from the Plugins tab (Plugin Installer), and if your server still runs vanilla, switch to Paper in Version first. Plugins do not work on vanilla or Fabric.

Bedrock players and Bedrock servers

  • Bedrock friends on a Java server through Geyser and Floodgate do not have a Java account. Ban them while they are online, using the name exactly as it appears in list (Floodgate adds a prefix, a dot by default).
  • A Bedrock Dedicated Server has no ban command; the Wiki marks it as Java Edition only. There you keep the allowlist on and remove the person, then kick them. See how to whitelist a Bedrock server.

Ban, kick or whitelist? Pick the right tool

SituationUseLasts
Someone needs a warningkick Name reasonUntil they reconnect
Cool-off periodtempban Name 1d (EssentialsX)The time you set
Griefer or cheaterban Name reasonUntil pardon
Same person keeps making new accountsban-ip, with careUntil pardon-ip
Private server for friends onlyWhitelistStrangers never get in

On a private server, the Minecraft server whitelist prevents most problems before you need a ban. Bans are for public servers and for the friend of a friend who went too far.

Moderate from anywhere with TheGameHosting

A griefer does not wait until you are home. The TheGameHosting panel works from your phone, so you can open Console and run ban wherever you are. Through Users you can give a co-admin their own access to the console without sharing your password, and Backups lets you roll the world back to before the damage. The server stays online 24/7 in Dallas or Amsterdam with DDoS protection, and you never open ports at home.

Plans start at $1.90 USD/month on our Minecraft server hosting page. Compare RAM sizes on plans and pricing and use the code FULL2026 for 15% off for life.

FAQ

How do you ban someone on a Minecraft server?

Open the server console and type ban PlayerName reason. In-game, an operator types /ban PlayerName reason. The player is disconnected and cannot rejoin.

Can I ban a player who is offline?

Yes. With a plain username, ban works for players who are offline or who have never joined, as long as the name belongs to a real account on an online-mode server.

How do I temp ban someone on Minecraft?

Vanilla has no timed ban. Install a plugin such as EssentialsX on Paper and use tempban PlayerName 1d reason; the ban ends on its own.

Can a banned player join with a new username?

Not with the same account. The ban is tied to the account’s UUID, so changing the name does not help. A different account is a different player; that is where IP bans come in.

Hosting for these games

Written by TheGameHosting Team, the people who run our servers in Dallas and Amsterdam and answer your tickets.

All posts