AwesomeKeycards
作者: NeonDev
平台: PaperMC 1.21.8
语言: Kotlin (2.3.0-Beta2),使用 Gradle + Shadow + run-paper。
版本: 1.4.1
AwesomeKeycards 允许你将任何物品变成数字钥匙卡,锁定交互式方块,并与受信任的玩家共享访问权限。它专为希望在不依赖重型领地系统的前提下实现轻量级门/战利品保护的现代生存服务器而设计。
功能亮点
- ? 自定义标签的钥匙卡 –
/keycard create [global|team <team>] <label> 将手持物品转换为具有唯一 ID 的钥匙卡,并可选配置颜色/样式/自动关闭/双扇/通知/冷却预设。
- ? 方块锁定 – 锁定门、陷阱门、栅栏门、按钮、箱子、桶、熔炉、潜影盒等。只有匹配的钥匙卡(或已共享用户)才能与之交互。
- ? 可共享的访问权限 – 卡片所有者可以通过
/keycard access add/remove/list 授予或撤销访问权限,非常适合室友或阵营成员。
- ? 灵活的钥匙类型 – 创建个人(默认)、
global 或 team <name> 类型的钥匙,以匹配开放大厅或由计分板管理的队伍。
- ?️ 命令预设 – 在
create 命令中直接设置强调色、效果样式、自动关闭计时器、双扇门同步、所有者警报和冷却默认值。
- ? 管理员保险库 –
/keycard vault 列出所有钥匙卡,并提供快速克隆和撤销选项,同时清理相关锁定的记录。
- ?️ 锁定检查 – 使用任何钥匙卡右键单击(Shift+右击)被锁定的方块,即可查看其关联的钥匙、所有者以及可复制的 ID(仅限管理员)。
- ? 门自定义 –
/keycard door(所有者使用,无需管理员权限)控制自动关闭计时器、双扇门同步、所有者警报、冷却时间、样式预设、昵称以及用于快速设置的复制/粘贴剪贴板。
- ? 样式预设 – 为每个锁定选择经典、隐身或火花效果,以改变粒子颜色和声音。
- ? 所有者警报 – 当有人使用你的锁定时触发可选提示,经过节流处理以避免垃圾信息。
- ⏱️ 使用冷却时间 – 通过每锁定的延迟来限制门或按钮上的快速重复操作。
- ? 门状态 HUD – 通过
/keycard door status 即时显示目标锁定的昵称和切换选项摘要。
- ?️ 配置剪贴板 – 在不同门之间复制/粘贴锁定设置,以便快速建立基地。
- ? 视觉反馈 – 开锁/关锁时有粒子轨迹和提示音,访问被阻止时有轻微的拒绝音调。
- ? 持久化存储 – 锁定数据保存至
locks.yml,卡片及 ACL 保存至 keycards.yml,确保重启后数据安全。
- ⚙️ 细粒度权限 – 创建和锁定操作仅限管理员工作流,但拥有访问权限的任何人都可以管理自己卡片的共享。
- ? 团队看门狗 – 可选的允许/禁止列表,加上自动修剪与已删除团队关联的团队钥匙,保持 ACL 整洁。
- ? 审计日志 –
/keycard audits 跟踪最近的锁定/解锁尝试,显示玩家、钥匙短 ID 和位置。
命令
| 命令 |
权限 |
描述 |
/keycard create [global/team <team>] <label> [color=<name>] [style=<preset>] [autoclose=<seconds/off>] [double=<on/off>] [notify=<on/off>] [cooldown=<seconds/off>] |
awesomekeycards.admin |
将手持物品转换为带标签的钥匙卡,并可设置未来锁的可选默认值。 |
/keycard lock |
awesomekeycards.admin |
将手持钥匙卡链接到你正在查看的方块(6格距离)。 |
/keycard unlock |
awesomekeycards.admin |
如果你持有已链接的钥匙卡,则解锁该方块。 |
/keycard access add <player> |
awesomekeycards.access |
授予其他玩家使用当前钥匙卡的权限。 |
/keycard access remove <player> |
awesomekeycards.access |
撤销某玩家的访问权限。 |
/keycard access list |
awesomekeycards.access |
列出所有可以使用当前钥匙卡的人。 |
/keycard view |
awesomekeycards.access |
显示所持钥匙卡的所有者、范围及共享详情。 |
/keycard door <status/autoclose/double/notify/cooldown/style/nickname/copy/paste> |
awesomekeycards.access (所有者或管理员) |
自定义目标锁定方块:计时器、双门同步、警报、样式、昵称以及剪贴板操作。 |
/keycard vault [page] |
awesomekeycards.admin |
浏览所有存储的钥匙卡,克隆它们,或撤销并清理锁。 |
/keycard audits [player] [count] |
awesomekeycards.admin |
显示最近的审计记录;默认为10条。 |
在运行任何命令之前,请确保你的主手持有钥匙卡物品。
默认情况下,awesomekeycards.admin 仅限 OP 使用,而 awesomekeycards.access 会授予所有玩家,以便他们管理自己的卡片。
示例:/keycard create global Lobby color=gold style=sparks autoclose=5 double=off notify=on cooldown=3
支持的方块
- 所有门、陷阱门、栅栏门和按钮(通过 Bukkit 标签支持)。
- 实用方块:拉杆、箱子、普通箱与陷阱箱、熔炉、烟熏炉、高炉、投掷器、发射器、漏斗、潜影盒(所有颜色)。
- 在锁定双开门时,请瞄准下半部分;插件会标准化坐标,使两半保持链接,并且如果启用了同步功能,两侧的开闭状态将会同步。
钥匙卡类型
- 个人(Personal) – 默认行为。所有者以及手动共享的 UUID 可以操作已链接的方块。
- 全局(Global) – 使用
/keycard create global <label> 允许所有玩家与锁定在该钥匙上的方块进行交互(非常适合仍记录活动的主出生点大门)。
- 团队(Team) – 使用
/keycard create team <teamName> <label> 将锁绑定到原版记分板团队(例如 /team add Guards)。该团队的任何成员都可以在无需物理物品的情况下打开该方块。
在分发副本之前,手持卡片时使用 /keycard view 以确认其范围、所有者和共享列表。
门自定义(无需管理员权限)
拥有者(或管理员)查看一个上锁的方块时,可以执行 /keycard door ...:
status – 显示昵称以及所有针对目标锁的切换状态。
autoclose <seconds|off> – 在延迟后自动关闭门/栅栏门/陷阱门。
double <on|off> – 同时打开/关闭双扇门的两半。
notify <on|off> – 当其他人使用锁时通知拥有者(已限流)。
cooldown <seconds|off> – 添加短暂的延迟以防止频繁切换。
style <classic|stealth|sparks> – 更改每个锁的粒子效果/音效。
nickname <name|off> – 在状态/警报中显示的友好标签。
copy / paste – 在这些设置之间克隆,以便快速搭建基地。
您在 /keycard create 上设置的默认值(颜色、样式、自动关闭、双扇门、警报、冷却时间)会保存在钥匙卡上,并在下次将该卡链接到方块时应用到锁上。
所有自定义功能均使用 awesomekeycards.access 权限(默认为 true),且只需拥有钥匙即可,不需要服务器管理员权限。
配置
teamAccess.allow / teamAccess.deny(列表)控制哪些计分板团队可用于团队钥匙卡;若将 allow 留空,则默认允许所有团队。
teamAccess.watchdogIntervalTicks 控制多久修剪一次过期/被阻止的团队钥匙卡。
- 审计日志写入
plugins/AwesomeKeycards/audit.log,并可通过游戏内的 /keycard audits 命令进行实时跟踪。
AwesomeKeycards
Author: NeonDev
Platform: PaperMC 1.21.8
Language: Kotlin (2.3.0-Beta2) using Gradle + Shadow + run-paper.
Version: 1.4.1
AwesomeKeycards lets you turn any item into a digital keycard, lock interactive blocks, and share access with trusted players. It is designed for modern survival servers that want lightweight door/loot protection without relying on heavy land-claim systems.
Feature Highlights
- ? Custom-labeled keycards –
/keycard create [global|team <team>] <label> converts the held item with a unique ID, plus optional color/style/auto-close/double/notify/cooldown presets.
- ? Block locking – lock doors, trapdoors, fence gates, buttons, chests, barrels, furnaces, shulkers, etc. Only matching keycards (or shared users) can interact.
- ? Shareable access – card owners can grant or revoke access via
/keycard access add/remove/list, perfect for roommates or faction mates.
- ? Flexible key types – create personal (default),
global, or team <name> keys to match open-access lobbies or scoreboard-managed squads.
- ?️ Command presets – set accent color, effect style, auto-close timer, double-door sync, owner alerts, and cooldown defaults right on the
create command.
- ? Admin vault –
/keycard vault lists every keycard with quick cloning and revoke options that also clean up locks.
- ?️ Lock inspection – shift-right-click a locked block with any keycard to see its linked key, owner, and a copyable ID (admins only).
- ? Door customization –
/keycard door (owner, no admin perm) controls auto-close timers, double-door syncing, owner alerts, cooldowns, style presets, nicknames, and a copy/paste clipboard for fast setup.
- ? Style presets – pick classic, stealth, or spark effects per lock to change particle colors and sounds.
- ? Owner alerts – optional pings when someone uses your lock, throttled to avoid spam.
- ⏱️ Use cooldowns – rate-limit rapid spam on doors or buttons with a per-lock delay.
- ? Door status HUD – instant summary of the targeted lock’s nickname and toggles via
/keycard door status.
- ?️ Config clipboard – copy/paste lock settings between doors to set up bases quickly.
- ? Visual feedback – particle trails + jingles on lock/unlock and a subtle denied tone when access is blocked.
- ? Persistent storage – locks saved to
locks.yml, cards + ACL to keycards.yml, ensuring safety across restarts.
- ⚙️ Fine-grained permissions – admin-only workflow for creating/locking, but anyone with the access permission can manage sharing for their own cards.
- ? Team watchdog – optional allow/deny lists plus automatic pruning of team keys tied to removed teams keep ACLs clean.
- ? Audit log –
/keycard audits tail recent lock/unlock attempts with player, key short ID, and location.
Commands
| Command |
Permission |
Description |
/keycard create [global/team <team>] <label> [color=<name>] [style=<preset>] [autoclose=<seconds/off>] [double=<on/off>] [notify=<on/off>] [cooldown=<seconds/off>] |
awesomekeycards.admin |
Converts the held item into a labeled keycard with optional defaults for future locks. |
/keycard lock |
awesomekeycards.admin |
Links the held keycard to the block you are looking at (6 block reach). |
/keycard unlock |
awesomekeycards.admin |
Unlocks a block if you hold the linked keycard. |
/keycard access add <player> |
awesomekeycards.access |
Grants another player the ability to use the current keycard. |
/keycard access remove <player> |
awesomekeycards.access |
Revokes access for a player. |
/keycard access list |
awesomekeycards.access |
Lists everyone who can use the current keycard. |
/keycard view |
awesomekeycards.access |
Displays owner, scope, and sharing details for the held keycard. |
/keycard door <status/autoclose/double/notify/cooldown/style/nickname/copy/paste> |
awesomekeycards.access (owner or admin) |
Customize the targeted locked block: timers, double-door syncing, alerts, styles, nicknames, and clipboard actions. |
/keycard vault [page] |
awesomekeycards.admin |
Browse all stored keycards, clone them, or revoke + clean locks. |
/keycard audits [player] [count] |
awesomekeycards.admin |
Show the most recent audit lines; defaults to 10 entries. |
Hold the keycard item in your main hand before running any command.
By default awesomekeycards.admin is OP-only, while awesomekeycards.access is granted to all players so they can manage their own cards.
Example: /keycard create global Lobby color=gold style=sparks autoclose=5 double=off notify=on cooldown=3
Supported Blocks
- All doors, trapdoors, fence gates, and buttons (via Bukkit tags).
- Utility blocks: levers, barrels, chests (normal & trapped), furnaces, smokers, blast furnaces, droppers, dispensers, hoppers, shulker boxes (all colors).
- When locking double-doors, aim at the lower half; the plugin normalizes coordinates so both halves stay linked and, if enabled, will sync open/close on both sides.
Keycard Types
- Personal – default behavior. Owner plus manually shared UUIDs can operate linked blocks.
- Global –
/keycard create global <label> lets every player interact with blocks locked to that key (great for spawn doors that still log activity).
- Team –
/keycard create team <teamName> <label> ties the lock to a vanilla scoreboard team (/team add Guards). Any member of that team can open the block without needing the physical item.
Use /keycard view while holding a card to confirm its scope, owner, and share list before distributing copies.
Door Customization (no admin needed)
Owners (or admins) looking at a locked block can run /keycard door ...:
status – show nickname plus all toggles for the targeted lock.
autoclose <seconds|off> – close doors/fence gates/trapdoors automatically after a delay.
double <on|off> – open/close both halves of a double door together.
notify <on|off> – ping the owner when others use the lock (throttled).
cooldown <seconds|off> – add a short delay to prevent spammy toggling.
style <classic|stealth|sparks> – change particles/sounds per lock.
nickname <name|off> – friendly label shown in status/alerts.
copy / paste – clone all these settings between locks to set up bases quickly.
Defaults you set on /keycard create (color, style, auto-close, double-door, alerts, cooldown) are saved on the keycard and applied to locks the next time you link that card to a block.
All customization uses the awesomekeycards.access permission (default true) and only requires owning the key, not server admin.
Configuration
teamAccess.allow / teamAccess.deny (lists) gate which scoreboard teams can be used for team keycards; leave allow empty to allow all by default.
teamAccess.watchdogIntervalTicks controls how often stale/blocked team keycards are pruned.
- Audit logs are written to
plugins/AwesomeKeycards/audit.log and can be tailed in-game with /keycard audits.
评论 0
登录后参与评分
还没有评论,来抢沙发吧