AntiSignEdit
一款兼容 Folia 的 Minecraft 1.21.x 插件,在玩家完成告示牌书写后将其锁定,防止后续编辑。
功能
- 告示牌 GUI 关闭后立即锁定
- 首次交互时自动锁定已存在的告示牌(即在安装插件前放置的告示牌)
- 支持所有类型的告示牌:经典告示牌、墙壁告示牌以及所有悬挂式告示牌变体
- 告示牌仍可正常被破坏
- OP 拥有
antisignedit.bypass 权限的玩家仍可自由编辑告示牌
- 可配置拦截时的提示信息(或完全禁用提示)
- 通过
RegionScheduler 实现 Folia 兼容
权限
| 权限 |
默认值 |
描述 |
antisignedit.bypass |
op |
允许玩家绕过告示牌锁定 |
配置
首次运行后位于 plugins/AntiSignEdit/config.yml。
messages:
# 设为 false 可在不发送任何消息的情况下静默阻止
send-on-block: true
# 支持完整的 MiniMessage 格式
edit-blocked: "<red>此告示牌已被锁定,无法编辑。"
工作原理
新告示牌: 当玩家关闭告示牌编辑 GUI 时,会触发 SignChangeEvent。一个区域调度任务(Folia 安全)会在事件解析后立即对告示牌方块施加蜡块。在原版 Minecraft 中,涂蜡后的告示牌无法打开进行编辑。
已存在的告示牌: 当玩家右键点击任何未涂蜡的告示牌时,插件会在取消交互的同时立即对其涂蜡。这意味着旧告示牌在首次接触时会被追溯锁定。
绕过: 如果交互的玩家是 OP(player.isOp())或拥有 antisignedit.bypass 权限,则交互不会被取消,玩家可以自由编辑。
AntiSignEdit
A simple Folia-compatible Minecraft 1.21.x plugin that locks signs after a player finishes writing on them, preventing any future edits.
Features
- Locks signs the moment the sign GUI closes after placement
- Automatically locks pre-existing signs (placed before the plugin was installed) on first interaction
- Works with all sign types: classic signs, wall signs, and all hanging sign variants
- Signs can still be broken normally
- Ops and players with
antisignedit.bypass can still edit signs freely
- Configurable message shown when a player is blocked (or disable the message entirely)
- Folia compatible via
RegionScheduler
Permissions
| Permission |
Default |
Description |
antisignedit.bypass |
op |
Allows the player to bypass sign locking |
Configuration
Located at plugins/AntiSignEdit/config.yml after first run.
messages:
# Set to false to silently block without sending any message
send-on-block: true
# Supports full MiniMessage formatting
edit-blocked: "<red>This sign has been locked and cannot be edited."
How It Works
New signs: When a player closes the sign editing GUI, SignChangeEvent fires. A region-scheduled task (Folia-safe) immediately waxes the sign block after the event resolves. Waxed signs cannot be opened for editing in vanilla Minecraft.
Pre-existing signs: When a player right-clicks any unwaxed sign, the plugin waxes it on the spot before cancelling the interaction. This means old signs are retroactively locked on first touch.
Bypass: If the interacting player is an op (player.isOp()) or has the antisignedit.bypass permission, the interaction is not cancelled and they may edit freely.
评论 0
登录后参与评分
还没有评论,来抢沙发吧