Old School Jail Mod
一款适用于 Minecraft Fabric 服务器的经典监狱模组——重温往昔美好时光!
功能特性
- 囚禁玩家:使用可自定义的时间限制和理由来囚禁玩家
- 监狱管理:设置多个监狱位置,并按需删除
- 权限系统:完全集成 Fabric Permissions API(兼容 LuckPerms 及其他权限模组)
- 智能限制:被囚禁的玩家无法:
- 破坏或放置方块
- 与方块交互(如按钮、拉杆等)
- 使用命令(除
/jail time 查看刑期外)
- 传送或逃脱(会自动传送回监狱)
- 高度可配置:提供丰富的配置文件供自定义
- 数据持久化:所有监狱和被囚禁玩家的数据都会在服务器重启后保存并恢复
- 自动释放:当刑期结束时,玩家会被自动释放
- 记录原始位置:释放时可将玩家传送回其原始位置(可在配置中启用)
- 登出/登录处理:玩家登出后仍保持被囚禁状态;若离线期间刑期已过期,则自动释放
- 多监狱支持:可创建多个监狱,并选择将玩家关押至哪一个
- 兼容 Essential Commands:完全兼容 Essential Commands —— 推荐的配套模组
命令
主要命令
-
/jail <player> <time> <reason> - 将玩家关入第一个可用的监狱
- 时间单位基于配置设置(默认:分钟)
- 示例:
/jail Steve 30 Griefing the spawn
-
/jail <player> <jail_name> <time> <reason> - 将玩家关入指定的监狱
- 示例:
/jail Steve spawn 30 Being annoying
-
/jail release <player> - 提前释放一名玩家(如果配置中启用,则传送回原始位置)
-
/jail time - 查看自己的剩余刑期(仅限被囚禁玩家使用)
-
/jail time <player> - 查看任意玩家的刑期(仅管理员可用 - 需要 oldschooljail.jail 权限)
-
/jail list - 列出当前所有被囚禁玩家的详细信息(仅管理员可用 - 需要 oldschooljail.jail 权限)
管理员命令
/jail set <jail_name> - 在你当前位置设置一个监狱
/jail set <jail_name> <x> <y> <z> - 在指定坐标设置一个监狱
/jail delete <jail_name> - 删除一个监狱(会自动释放所有囚犯)
权限
本模组使用 Fabric Permissions API,并支持任何实现该接口的权限插件(如 LuckPerms)。
权限节点
oldschooljail.jail - 允许囚禁玩家
oldschooljail.release - 允许释放玩家
oldschooljail.set - 允许设置监狱位置
oldschooljail.delete - 允许删除监狱
oldschooljail.immune - 使玩家免疫于被囚禁
oldschooljail.time - 允许使用 /jail time(默认授予所有玩家)
oldschooljail.jail - 同时也允许使用 /jail time <player> 查看其他玩家的刑期
注意:如果未安装任何权限插件,模组将回退到 OP 等级 2 用于执行管理员命令。
配置
配置文件位于 config/oldschooljail.toml,首次运行时会自动生成,并包含有用的注释说明。
配置选项
TOML 文件为每个选项提供了详细的注释。以下是你可以配置的内容:
时间设置:
input_unit - 命令中的时间单位(SECONDS、MINUTES 或 HOURS)
max_sentence_seconds - 最大刑期长度(秒)
限制设置:
block_commands - 阻止所有命令,除了 /jail time
block_teleportation - 如果玩家逃脱超过 50 格,则自动传送回监狱
block_block_breaking - 阻止破坏方块
block_block_placing - 阻止放置方块
block_interaction - 阻止与方块交互
释放设置:
teleport_back_on_release - 释放玩家时将其传送回原始位置(如果设为 false,玩家必须手动走出监狱)
消息提示:
release - 手动释放时的提示信息
jail_expired - 刑期过期时的提示信息
所有设置都在配置文件中附有详细的注释,解释其作用!
安装
- 下载对应 MC 版本的 oldschooljail-[version].jar
- 将 JAR 文件放入服务器的
mods 文件夹
- 确保已安装 Fabric API
- (可选)安装像 LuckPerms 这样的权限插件以获得高级权限控制
- (推荐)安装 Essential Commands 以获得完整的怀旧体验
- 启动服务器
兼容性
- Minecraft 版本:1.21.2-1.21.11
- 加载器:Fabric
- 必需依赖:Fabric API
- 推荐依赖:LuckPerms 或其他兼容 Fabric Permissions API 的插件
- AFK 兼容性:完全兼容 Essential Commands —— 推荐的配套模组
许可证
本项目采用 MIT 许可证授权
Old School Jail Mod
A classic jail mod for Minecraft Fabric servers - just like the good old days!
Features
- Jail Players: Jail players with customizable time limits and reasons
- Jail Management: Set multiple jail locations and delete them as needed
- Permissions System: Full integration with Fabric Permissions API (works with LuckPerms and other permission mods)
- Smart Restrictions: Jailed players cannot:
- Break or place blocks
- Interact with blocks (buttons, levers, etc.)
- Use commands (except
/jail time to check their sentence)
- Teleport or escape (automatic teleport back to jail)
- Configurable: Extensive config file for customization
- Data Persistence: All jails and jailed players are saved and restored on server restart
- Auto-Release: Players are automatically released when their sentence expires
- Original Location Tracking: Players are teleported back to their original location upon release (configurable)
- Logout/Login Handling: Players remain jailed across logout/login and are auto-released if sentence expired offline
- Multiple Jails: Create multiple jails and choose which one to send players to
- Essential Commands Compatible: Fully compatible with Essential Commands - the recommended companion mod
Commands
Main Commands
-
/jail <player> <time> <reason> - Jail a player in the first available jail
- Time is based on config setting (default: minutes)
- Example:
/jail Steve 30 Griefing the spawn
-
/jail <player> <jail_name> <time> <reason> - Jail a player in a specific jail
- Example:
/jail Steve spawn 30 Being annoying
-
/jail release <player> - Release a player from jail early (teleports back to original location if enabled in config)
-
/jail time - Check your own remaining jail time (available to jailed players)
-
/jail time <player> - Check any player's jail time (admin only - requires oldschooljail.jail permission)
-
/jail list - List all currently jailed players with details (admin only - requires oldschooljail.jail permission)
Admin Commands
/jail set <jail_name> - Set a jail at your current location
/jail set <jail_name> <x> <y> <z> - Set a jail at specific coordinates
/jail delete <jail_name> - Delete a jail (automatically releases all prisoners)
Permissions
The mod uses the Fabric Permissions API and supports any permissions plugin that implements it (LuckPerms, etc.)
Permission Nodes
oldschooljail.jail - Allows jailing players
oldschooljail.release - Allows releasing players
oldschooljail.set - Allows setting jail locations
oldschooljail.delete - Allows deleting jails
oldschooljail.immune - Makes a player immune to being jailed
oldschooljail.time - Allows using /jail time (granted to all by default)
oldschooljail.jail - Also allows using /jail time <player> to check other players' jail time
Note: If no permissions plugin is installed, the mod falls back to OP level 2 for admin commands.
Configuration
The config file is located at config/oldschooljail.toml and is automatically generated on first run with helpful comments.
Config Options
The TOML file includes detailed comments for each option. Here's what you can configure:
Time Settings:
input_unit - Time unit for commands (SECONDS, MINUTES, or HOURS)
max_sentence_seconds - Maximum sentence length in seconds
Restrictions:
block_commands - Block all commands except /jail time
block_teleportation - Auto-teleport back if player escapes >50 blocks
block_block_breaking - Prevent breaking blocks
block_block_placing - Prevent placing blocks
block_interaction - Prevent interacting with blocks
Release Settings:
teleport_back_on_release - Teleport players back to original location when released (if false, players must walk out manually)
Messages:
release - Message on manual release
jail_expired - Message when sentence expires
All settings include helpful comments in the config file explaining what they do!
Installation
- Download the oldschooljail-[version].jar for your MC version
- Place the JAR file in your server's
mods folder
- Ensure you have Fabric API installed
- (Optional) Install a permissions plugin like LuckPerms for advanced permission control
- (Recommended) Install Essential Commands for full oldschool experience
- Start your server
Compatibility
- Minecraft Version: 1.21.2-1.21.11
- Mod Loader: Fabric
- Required: Fabric API
- Recommended: LuckPerms or other Fabric Permissions API compatible plugin
- AFK Compatibility: Fully compatible with Essential Commands - the recommended companion mod
License
This project is licensed under the MIT License
评论 0
登录后参与评分
还没有评论,来抢沙发吧