- Tham gia
- 30/12/2022
- Bài viết
- 103
CubiJails
Jail management plugin for Paper 1.20+
Jail management plugin for Paper 1.20+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Overview- Time-based jails with online-only option
- Multiple independent jail areas
- Selection Wand with custom Name/Lore/NBT (from config)
- Escape protection: run commands and pull player back
- Auto unjail when time is up + return to player’s original location
- Clean configs: config.yml, messages.yml, data.yml
- Tab-completion for all main commands
- Paper 1.20+ (recommended 1.20.6)
- Java 17
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Quick Start- Get the wand:
/jail givewand - Set area with the wand:
– Left click block = Pos1, Right click block = Pos2
– Or use/jailarea pos1and/jailarea pos2 - Create area:
/jailarea create <name> - Jail someone:
/jail <player> <jail-name> <time> [reason]
– Time supportss/m/h/d(e.g. 30s, 5m, 2h, 1d) - Escape protection: if prisoner leaves the area, configured commands run and they’re pulled back
- Auto unjail: when time ends, the player is unjailed and returned to their original location
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Commands-
/jail <player> <jail-name> <time> [reason]– Jail a player -
/unjail <player>– Release a player -
/jail givewand– Give the selection wand -
/jail reload– Reload configs/messages/data -
/jailarea create <name>– Create jail from Pos1/Pos2 -
/jailarea remove <name>– Remove a jail area -
/jailarea list– List jail areas -
/jailarea pos1,/jailarea pos2– Set pos at your location
-
cubijails.jail -
cubijails.unjail -
cubijails.area.create/cubijails.area.remove/cubijails.area.list/cubijails.area.select/cubijails.area.tool -
cubijails.reload -
cubijails.bypass(skip jail area checks)
- /jail
– Arg1:givewand,reload, online player names
– Arg2: jail names
– Arg3: time templates (30s,1m,5m,1h,1d) - /unjail: prisoners currently jailed
- /jailarea:
create/remove/list/pos1/pos2(+ names where relevant)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Configuration
YAML:
# If true, jail time only decreases while the player is online
count-time-only-online: false
# Commands executed by console if a prisoner escapes the area
escape-commands:
- "tp {player} 0 64 0"
- "tell {player} &cBạn không thể trốn khỏi khu vực này!"
# Selection tool (wand)
selection-tool:
material: WOODEN_PICKAXE
name: "&6&lCubiJails Selector"
lore:
- "&7Dùng để chọn khu vực tù"
- "&eChuột trái: &fĐặt pos1"
- "&eChuột phải: &fĐặt pos2"
nbt-key: "CubiJailsSelector" # Dùng để nhận diện item (đừng động vào nếu không hiểu gì)
# Tick interval (20 tick = 1 second)
check-interval: 20
YAML:
# Placeholders: {player}, {jail}, {time}, {reason}, {pos1}, {pos2}, {count}
player-jailed: "&cBạn đã bị giam trong &e{jail} &ctrong &e{time} &cvì: &f{reason}"
player-jailed-no-reason: "&cBạn đã bị giam trong &e{jail} &ctrong &e{time}"
player-unjailed: "&aBạn đã được thả khỏi &e{jail}!"
player-escape-warning: "&cBạn không thể trốn khỏi khu vực này!"
player-escape-caught: "&cBạn đã bị đưa trở lại &e{jail}!"
admin-jailed-player: "&aĐã giam &e{player} &avào &e{jail} &atrong &e{time} &avì: &f{reason}"
admin-jailed-player-no-reason: "&aĐã giam &e{player} &avào &e{jail} &atrong &e{time}"
admin-unjailed-player: "&aĐã thả &e{player} &akhỏi &e{jail}!"
pos1-set: "&aĐã đặt &ePos1 &atại &e{pos1}"
pos2-set: "&aĐã đặt &ePos2 &atại &e{pos2}"
area-created: "&aĐã tạo khu vực tù &e{jail}!"
area-deleted: "&aĐã xóa khu vực tù &e{jail}!"
area-exists: "&cKhu vực tù &e{jail} &cđã tồn tại!"
area-not-found: "&cKhông tìm thấy khu vực tù &e{jail}!"
area-list-header: "&6Danh sách khu vực tù (&e{count}&6):"
area-list-entry: "&e- {jail}"
no-permission: "&cBạn không có quyền thực hiện lệnh này!"
player-not-found: "&cKhông tìm thấy người chơi &e{player}!"
not-in-jail: "&cNgười chơi &e{player} &ckhông ở trong tù!"
invalid-time-format: "&cThời gian không hợp lệ! Ví dụ: &e10m, 2h, 1d"
usage-jail: "&cCú pháp: &e/jail <player> <jail-name> <time> [reason]"
usage-unjail: "&cCú pháp: &e/unjail <player>"
usage-jailarea-create: "&cCú pháp: &e/jailarea create <name>"
usage-jailarea-remove: "&cCú pháp: &e/jailarea remove <name>"
selection-invalid: "&cPos1/Pos2 chưa hợp lệ hoặc khác world!"
subcommand-invalid: "&cSubcommand không hợp lệ."
reloaded: "&aCubiJails đã reload."
YAML:
jails:
jail1:
world: world
pos1: "0,64,0"
pos2: "10,70,10"
prisoners:
Steve:
jail: jail1
time-left: 600
reason: "PVP trái phép"
online-only: false
origin:
world: world
pos: "100,64,100"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
How It Works- Jail → Save data → Teleport into area → Tick loop counts down time
- Escape check every
check-intervalticks:
– If out of bounds: runescape-commandsand pull back - Time up: auto unjail and return to original location
- {player}, {jail}, {time}, {reason}, {pos1}, {pos2}, {count}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Support- Open an issue on the source repo or contact us on Discord (CubiLabs)
- © CubiLabs. All rights reserved (see repository for details).
