A jail is one of the most useful moderation tools you can add to a Minecraft server. Instead of permanently banning a rule-breaker, you can lock them in a confined area for a set amount of time, give them a “time-out,” and let them rejoin the community afterward. The EssentialsX plugin makes this trivial to set up, and once it is configured you can jail and release players with a single command. This guide walks through creating a jail point, sending players to it (with or without a release timer), freeing them again, and every permission node that controls who can do what.
Before anything else: EssentialsX is a Bukkit-API plugin, which means it runs on Spigot, Paper, or a Paper fork like Purpur on Minecraft: Java Edition. It does not work on vanilla servers, Bedrock, Fabric, or Forge. If you are running one of those platforms, the commands below simply will not exist. If you need a host that runs Paper out of the box with one-click plugin support, our Minecraft server hosting ships ready for EssentialsX so you can skip the manual setup.
What you need before you start
- A Spigot, Paper, or Purpur server (Java Edition).
- The EssentialsX plugin installed in your
pluginsfolder and the server restarted at least once so it generates its config. - Operator (OP) status, or a permissions plugin such as LuckPerms granting you the jail permission nodes covered below.
- A spot in your world you want to use as the jail cell — ideally an enclosed, escape-proof room.
If you have not installed EssentialsX yet, our Minecraft setup documentation covers dropping plugins into the right folder and reloading the server. With the plugin loaded, you are ready to build a jail.
Step 1: Create a jail point with /setjail
A jail in EssentialsX is just a named teleport location — the spot where jailed players are sent and held. Walk to the exact position where you want prisoners to spawn (stand inside your prepared cell), then run the command. The jail is created at your current coordinates and facing direction.
/setjail
For example, to make a jail named mainjail, stand in the cell and type:
/setjail mainjail
The /setjail command also accepts the aliases /esetjail, /createjail, and /ecreatejail — they all do exactly the same thing. To run it, you need this permission node:
essentials.setjail
You can create as many jails as you like by giving each a different name — for instance a low-security mainjail and a stricter maxjail for repeat offenders. Each name becomes a target you can reference when jailing a player.
Step 2: Jail a player with /jail
Once a jail point exists, send a player to it with the /jail command. The full usage is:
/jail [datediff]
The first two arguments are required: the player’s name and the jail they should be sent to. The third argument, [datediff], is an optional duration. If you include it, the player is automatically released when the timer expires. If you leave it off, the player is jailed indefinitely until a staff member manually frees them.
To jail a player named Steve in mainjail for ten minutes:
/jail Steve mainjail 10m
The duration uses the standard EssentialsX date-difference format. Common values look like:
10m— ten minutes2h— two hours1d— one day
To jail Steve permanently (no auto-release), simply omit the time:
/jail Steve mainjail
The permission required to jail (and, as we will see, to unjail) a player is:
essentials.jail
While jailed, the player is teleported to the jail location and cannot leave it. If they log out and back in, EssentialsX keeps them jailed and returns them to the cell, so there is no escaping by reconnecting.
Step 3: The most important detail — jail, togglejail, and unjail are ONE command
This is the part that trips up most server admins, so read carefully. In current EssentialsX, jail, togglejail, and unjail are not three separate commands — they are all the same single command. The names /togglejail and /unjail are simply aliases of /jail.
The full alias list for the jail command is /ejail, /tjail, /etjail, /togglejail, /etogglejail, /unjail, and /eunjail. Every one of those points at the same underlying command.
Because the command toggles, running it on a player who is already jailed frees them. So to release a prisoner, you run the jail command (under any of its alias names) on that player:
/togglejail Steve
or equivalently:
/unjail Steve
Both of those use the same essentials.jail permission as jailing does, because they are the same command. There is no separate “unjail permission” to assign — if a staff member can jail a player, they can free them too. When you free a jailed player they are teleported back to where they were jailed from (or to spawn, depending on configuration) and regain normal movement.
Command and permission summary
| Action | Command | Aliases | Permission |
|---|---|---|---|
| Create a jail point | /setjail | /esetjail, /createjail, /ecreatejail | essentials.setjail |
| Jail a player (timed) | /jail | /ejail, /tjail, /etjail | essentials.jail |
| Jail a player (indefinite) | /jail | /ejail, /tjail, /etjail | essentials.jail |
| Free a jailed player | /togglejail or /unjail | (aliases of /jail) | essentials.jail |
Controlling access to individual jails
If you run multiple jails and want to restrict which staff can use which one, EssentialsX exposes a per-jail permission node:
essentials.togglejail.
For example, essentials.togglejail.maxjail would scope a staff group to your maximum-security jail specifically. This is handy when you want junior moderators to only use the standard cell while senior staff manage the harsher one.
Some setups also reference a “notify staff on jail” node following EssentialsX’s naming convention (something along the lines of essentials.jail.notify), but the exact behavior of that node depends on your EssentialsX version and configuration — treat it as convention-based rather than guaranteed, and confirm against your own build before relying on it.
Granting jail powers with a permissions plugin
If you use LuckPerms (the most common permissions plugin), giving your moderator group the ability to manage jails looks like this:
/lp group moderator permission set essentials.setjail true
/lp group moderator permission set essentials.jail true
With those two nodes, a moderator can build jail points, send players to them, and release them. If you only want some staff to use jails (not create them), grant essentials.jail alone and keep essentials.setjail reserved for admins.
Building a good jail cell
The /setjail command only records a location — it does not build walls for you. A few practical tips for a jail that actually holds prisoners:
- Fully enclose the cell with bedrock or another unbreakable/protected block so players cannot mine out. Jailed players can still interact with the world in many configs.
- Light it up so hostile mobs do not spawn and kill the prisoner (unless that is part of the punishment you intend).
- Keep it away from spawn so other players are not disrupted, but somewhere you can reach quickly to check on offenders.
- Test it by jailing an alt account or asking a trusted staff member to verify they cannot escape.
Combine the jail with EssentialsX’s broader moderation toolkit and you have a complete staff workflow: investigate a player, see what they are carrying, and decide on a punishment. For investigation, our guide on checking a player’s inventory with EssentialsX and the companion guide on viewing a player’s ender chest pair naturally with jailing rule-breakers. To slip in unseen and watch a suspect before acting, see how to use the EssentialsX vanish ability.
Troubleshooting common jail problems
- “Unknown command” when typing /jail or /setjail. EssentialsX is not loaded, or you are not on Spigot/Paper. Check your console on startup for the EssentialsX enable message, and confirm your server type — vanilla, Bedrock, Fabric, and Forge do not support it.
- “You do not have permission.” You are missing
essentials.setjail(to create) oressentials.jail(to jail/free). Grant the node via your permissions plugin or use an OP account. - The player keeps escaping the cell. The jail location is fine, but the room is not enclosed. The command saves a point, not a structure — build solid, protected walls.
- Trying to unjail does nothing. Remember
/unjailis an alias of/jail; run it on a currently-jailed player to toggle them free. If they were never jailed, the toggle may jail them instead.
Frequently asked questions
How do I jail a player for a specific amount of time?
Add a duration as the optional third argument: /jail Steve mainjail 10m jails Steve for ten minutes, after which EssentialsX releases him automatically. Use formats like 2h for two hours or 1d for a day.
How do I jail someone indefinitely?
Simply leave off the time argument: /jail Steve mainjail. The player stays jailed until a staff member manually frees them with /unjail Steve or /togglejail Steve.
What is the difference between /unjail and /togglejail?
There is no functional difference — both are aliases of the single /jail command. Because that command toggles, running either one on a player who is already jailed releases them. They share the same essentials.jail permission.
What permission do I need to set up and use a jail?
You need essentials.setjail to create a jail point with /setjail, and essentials.jail to send players to a jail and to free them again. For per-jail control over multiple jails, use essentials.togglejail..
Does EssentialsX jail work on Bedrock or Fabric servers?
No. EssentialsX is a Bukkit-API plugin that only runs on Spigot, Paper, or Paper forks like Purpur on Minecraft: Java Edition. It does not work on vanilla, Bedrock, Fabric, or Forge servers.
Can I have more than one jail?
Yes. Run /setjail with a different name at each location — for example /setjail mainjail and /setjail maxjail — then reference the name when jailing: /jail Steve maxjail 1d. You can scope staff access per jail with essentials.togglejail..
Wrapping up
The EssentialsX jail system is one command to create (/setjail ), one to enforce (/jail ), and the same command again to release. The two permission nodes that matter are essentials.setjail and essentials.jail, with essentials.togglejail. available for per-jail control. Remember the one quirk that catches everyone out: jail, togglejail, and unjail are all the same toggling command. Round out your moderation kit with related EssentialsX features like warp points so staff can teleport straight to the jail, and you have a clean, reversible alternative to banning that keeps players engaged with your server.
Free Minecraft Tools
Speed up your server with our free Minecraft tools:
Ready to play?
Run your own Minecraft server with XGamingServer
Spin up an always-on Minecraft server your friends can join in minutes — no port-forwarding, no tech headaches.






