SweetLocks
一款复古风格的付费铁门插件的怀旧复刻。
默认配置为中文。如需英文或其他语言,请查阅 localization 仓库。
简介
在我大约于 1.8 时代游玩 1.6 服务器时,有一个名为 付费门 (Paid Door) 的功能。 你只需在铁门上方的方块放置一块告示牌:
- 第一行:
[lock](类似 Lockette 中的[Private]锁牌) - 第二行:
Vault货币价格,例如100 - 第三行:空白
- 第四行:标志位 -
I、O、E、NM、NP分别代表:I= 允许进入O= 允许离开E= 要求背包为空NM= 要求 0 Vault 货币NP= 要求无药水效果
这就创建了一个付费门。玩家支付 Vault 货币即可传送到门的另一侧, 非常适合用于抽奖机、安全门禁等场景。
据我所知,原始的付费门插件早已停止维护, 因此我决定重新实现并改进它。其逻辑其实相当简单。
旧版本兼容性说明
1.14 以下的版本仅获得有限支持。 它们更有可能与其他插件发生冲突,且很难确定是哪个插件导致了冲突。
如果任何插件对告示牌执行了 block.getState().update();,
付费门将无法正常工作。
这是由于 Bukkit 的旧 API 导致的。
旧版本仅使用已弃用的 § 颜色代码进行格式化,
这会擦除插件用于存储数据的文本组件。
命令
根命令:/sweetlocks
别名:/slocks、/locks、/sl
| 命令 | 描述 | 权限 |
|---|---|---|
/locks |
显示帮助信息 | 无 |
/locks reload |
重载配置 | OP/控制台 |
权限
sweet.locks.create— 允许创建付费门sweet.locks.bypass.tax— 绕过由门创建者收集的 Vault 货币税费sweet.locks.bypass.distance— 绕过使用付费门的距离限制(默认:2.6 格内)
用法
在告示牌的第一行输入 $lock(或在配置中自定义的关键字)。
放置完告示牌后,将创建一个价格为 0 货币 且允许进出(进入/离开)的付费门,
并打开编辑菜单。
创建者可以Shift + 右键点击告示牌以打开编辑菜单, 在那里可以设置门的价格和标志位。
当玩家右键点击门时,会显示: “进入需花费 X 枚金币。按住 Shift + 右键可进入/离开。” 右键点击告示牌可查看门的信息。
机制
所有付费门数据均通过嵌入插件的 item-nbt-api 保存到告示牌方块中。
交易通知存储在本地数据文件中,并在玩家登录时发送/清除。
- 对于 1.14+:数据存储在方块的 PersistentDataContainer 中。
- 对于 1.14 以下的版本:数据存储在告示牌第一行的
insertion字段中。
SweetLocks
A nostalgic recreation of an old-fashion paid iron door plugin.
Default configurations are in Chinese. Check localization repository for English or other language.
Introduction
Back when I played on a 1.6 server around the 1.8 era, there was a feature called Paid Door. You simply placed a sign on the block above an iron door:
- First line:
[lock](something like that, similar to the[Private]lock sign in Lockette) - Second line:
Vault money price, e.g.100 - Third line: empty
- Fourth line: flag -
I,O,E,NM,NPmean:I= Allow entryO= Allow exitE= Require empty inventoryNM= Require 0 Vault moneyNP= Require no potion effects
This creates a paid door. Players pay Vault money to teleport to the other side, perfect for lottery machines, security gates, etc.
As far as I know, the original paid door plugin has been abandoned for a long time, so I decided to reimplement and improve it. The logic is actually quite simple.
Legacy Version Compatibility Note
Versions below 1.14 only receive limited support. They are more likely to conflict with other plugins, and it is hard to identify which plugin causes the conflict.
If any plugin runs block.getState().update(); on a sign,
the paid door will stop working.
This is due to Bukkit's old API.
Older versions only use the deprecated § color code for formatting,
which erases text components the plugin uses to store data.
Commands
Root command: /sweetlocks
Aliases: /slocks, /locks, /sl
| Command | Description | Permission |
|---|---|---|
/locks |
Show help | None |
/locks reload |
Reload config | OP/Console |
Permissions
sweet.locks.create— Allow creating paid doorssweet.locks.bypass.tax— Bypass tax on Vault money collected by the door creatorsweet.locks.bypass.distance— Bypass distance limit for using paid doors (default: within 2.6 blocks)
Usage
Just write $lock (or your custom keyword in config) on the first line of a sign.
Once you finish placing the sign, a paid door with price 0 money and allow entry/exit will be created,
and the edit menu will open.
The creator can Shift + Right-click the sign to open the edit menu, where they can set the price and flags for the door.
When a player right-clicks the door, it shows: "Costs X coins to enter. Hold Shift + Right-click to enter/exit." Right-click the sign to view door info.
Mechanism
All paid door data is saved to the sign block using item-nbt-api which embedded into plugin.
Transaction notifications are stored in a local data file and sent/cleared when the player logs in.
- For 1.14+: Data is stored in the block's PersistentDataContainer.
- For versions below 1.14: Data is stored in the
insertionfield of the first sign line.
下载 SweetLocks
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SweetLocks
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SweetLocks
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SweetLocks
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SweetLocks
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
插件
用于绘制游戏内地图或在浏览器中随探索实时进行地图绘制的实时地图。
评论 0
登录后参与评分
还没有评论,来抢沙发吧