An unofficial, community-maintained fork of the Jail Logic mod, updated for newer Minecraft versions.
⚠️ This is an unofficial fork of Jail Logic by n3mmuss.
The original project appears inactive, so this fork exists to keep the mod usable on newer Minecraft versions, with some optional improvements.
The original project’s source code is released under the CC0 license.
This fork is redistributed under the MIT License to clearly define attribution and contribution terms for future maintenance.
If the original author releases updates for the versions this fork targets and includes the fixes provided here, this fork will no longer be updated.
Please do not report issues to the original developer. Report them here instead.
The Jail Mod is a server-side mod that allows you to imprison players in a virtual prison, preventing them from interacting with the world until they are released. It is perfect for Minecraft servers where you want to impose temporary penalties or temporarily limit the movement of certain players.





config/jailmod/discord-messages.json in BanHammer-like format with auto patching for new fields.Build a prison (a closed structure).
Set the coordinates where you want the prisoner to spawn with the command /jail set x y z (example /jail set 0 60 0)
Reload the configuration using /jail reload .
Send someone to jail with /jail playerexample 120 Griefing.
If you don't want to wait for the prison time you set in seconds (example 120 seconds), you can release the player early with the command /unjail playerexample
.jar file in the mods folder of the Minecraft server./jail player time reason/jail player_name time_in_seconds reason/jail Steve 300 GriefingThis command jails the player Steve for 300 seconds (5 minutes) with the reason "Griefing"./unjail player/unjail player_nameSteve from jail./jail info/jail infoThis command will return a message similar to: "You are in jail for another 200 seconds. Reason: Griefing."/jail reloaddiscord-messages.json without restarting the server./jail reloadThis command reloads the mod's configuration, useful if the config files have been modified./jail set/jail set x y z/jail set 0 60 0When a player is jailed, they cannot do the following:
/jail info command.config/jailmod/config.jsonThis file is automatically generated and updated, it allows you to configure the jail's location and the player's release location and more. Here are the options you can find:
admin_roles: Comma-separated list of roles or tags that grant /jail access. e.g. "op,admin,moderator"use_previous_position: If set to true, players will be released in the position they were in before being jailed. If set to false, they will be released in a specific position.return_to_last_location: If true, released players will be teleported back to the exact spot where they were jailed.release_position: The fallback coordinates for releasing players if no other location (spawn/last) is used, active if use_previous_position is set to false or if return_to_last_location is set to false.jail_position: The coordinates where players are held while in jail with coordinates x, y, z.discord_webhook_url: Optional Discord webhook used for jail/un-jail embeds. Leave empty to auto-use BanHammer's webhook when BanHammer is installed and has a webhook url set (read from config/banhammer/config.json).use_banhammer_webhook: If true and discord_webhook_url is empty, JailMod may reuse BanHammer's webhook URL.{
"_config_guide": "JailMod Configuration Guide: \n- admin_roles: Comma-separated list of roles or tags that grant /jail access. Use \u0027op\u0027 to include server operators.\n- use_previous_position: If true, released players will be teleported to their original spawn point (if return_to_last_location is false or unavailable).\n- return_to_last_location: If true, released players will be teleported back to the exact spot where they were jailed.\n- jail_position: The coordinates where players are held while in jail.\n- release_position: The fallback coordinates for releasing players if no other location (spawn/last) is used.",
"admin_roles": "op",
"use_previous_position": true,
"return_to_last_location": true,
"discord_webhook_url": "",
"use_banhammer_webhook": true,
"release_position": {
"x": 100,
"y": 65,
"z": 100
},
"jail_position": {
"x": 20,
"y": 64,
"z": 142
}
}
config/jailmod/discord-messages.jsonThis file controls Discord webhook message templates in a BanHammer-style format and is auto-generated/auto-patched.
sendJailMessage: Enables jail webhook notifications.jailMessage: Template for jail events.sendUnjailMessage and unjailMessage: Template for manual unjail events.sendAutoUnjailMessage and autoUnjailMessage: Template for auto unjail events./jail reload reloads this file too.
config/jailmod/language.txtThis file contains the messages that are displayed in-game, customizable to match the tone or style of the server. If the file does not exist, it is automatically generated with default messages. Here are some of the messages you can modify:
jail_player: Message the player receives when they are jailed. Use the variables {time} for the duration and {reason} for the reason."You have been jailed for {time} seconds! Reason: {reason}"jail_broadcast: Message broadcast to all players on the server when a player is jailed."{player} has been jailed for {time} seconds. Reason: {reason}"unjail_player_manual: Message the player receives when they are manually released from jail."You have been manually released from jail!"unjail_broadcast_manual: Message broadcast to all players on the server when a player is manually released from jail."{player} has been manually released from jail!"unjail_player_auto: Message the player receives when they are automatically released from jail after the time expires."You have been released after serving your sentence."unjail_broadcast_auto: Message broadcast to all players on the server when a player is automatically released from jail after the time expires."{player} has been released after serving their sentence."block_interaction_denied: Message informing the player that they cannot interact with blocks while in jail."You cannot interact with blocks while in jail!"entity_interaction_denied: Message informing the player that they cannot interact with entities while in jail."You cannot interact with entities while in jail!"bucket_use_denied: Message informing the player that they cannot use lava or water buckets while in jail."You cannot use lava or water buckets while in jail!"item_use_denied: Message informing the player that they cannot use items while in jail."You cannot use items while in jail!"block_break_denied: Message informing the player that they cannot break blocks while in jail."You cannot break blocks while in jail!"jail_info_message: Message that shows the remaining time and the reason for the jail sentence when the player uses the /jail info command."You are in jail for another {time} seconds. Reason: {reason}."not_in_jail_message: Message shown if a player is not in jail and tries to use /jail info."You are not in jail!"Default language.txt example:
jail_player=You have been jailed for {time} seconds! Reason: {reason}
jail_broadcast={player} has been jailed for {time} seconds. Reason: {reason}
unjail_player_manual=You have been manually released from jail!
unjail_broadcast_manual={player} has been manually released from jail!
unjail_player_auto=You have been released after serving your sentence.
unjail_broadcast_auto={player} has been released after serving their sentence.
block_interaction_denied=You cannot interact with blocks while in jail!
entity_interaction_denied=You cannot interact with entities while in jail!
bucket_use_denied=You cannot use lava or water buckets while in jail!
item_use_denied=You cannot use items while in jail!
block_break_denied=You cannot break blocks while in jail!
jail_info_message=You are in jail for another {time} seconds. Reason: {reason}.
not_in_jail_message=You are not in jail!
Use the /jail reload command after changing configuration or language messages to apply the changes without having to restart the server. Always specify a clear reason for the jailing, so the player knows why they were jailed.
Set Jail spawn position:
/jail set 0 60 0
Jailing a player for an unfair action:
/jail Alex 600 Offending another player
This jails Alex for 10 minutes with the reason "Offending another player".
Checking jail time:
/jail info
A jailed player can use this command to check how much time they have left.