Lift Signs 是一款开源插件,允许你的用户创建类似 CraftBook 的 “[Lift up]”(向上)和 “[Lift down]”(向下)告示牌。本插件旨在为那些只需要此简单功能而不想要 CraftBook 附带的所有其他内容的用户提供单一插件解决方案。此外,该插件有意以开源形式提供,因此你可以自由下载、查看和修改源代码(GPL 许可证),这实际上也是编写它的主要原因,因为目前唯一的另一个替代方案 SignLift 是一个闭源插件。
安装
- 下载 LiftSign.jar 并将其放入你的 plugins 目录中
- 重启服务器或使用 PlugMan 或 PluginReloader 等优秀插件进行热加载
- 为你的用户添加权限(liftsign.normal.use 和 liftsign.normal.create)
用法
你的用户可以在告示牌的第三行输入 “[Lift up]”、“[Lift down]” 或 “[Lift]” 来创建相应的告示牌。由于本插件的设计功能与 CraftBook 电梯完全相同,请参阅 CraftBook 电梯维基 获取示例。
YouTube 演示视频,由 @IngrownPenguin 提供:
开发版本
- 可以通过提供的持续集成服务器获取本项目的开发构建版本。这些版本未经 BukkitDev 工作人员批准。使用风险自负。
- Jenkins
为什么插件文件这么大?
基本原因是,在当今高速网络的时代,我更看重良好的开发实践和可维护的插件,而不是下载大小。
LiftSign 使用一种称为控制反转(IoC)的开发模式,使代码非常灵活且易于测试。使用 Google Guice IoC 库会增加打包进插件的大小——实际的插件代码只有 20KB,但包含的库在打包后会使文件变大。结果是 LiftSign 使用了经过良好测试的常用库,并且得益于 IoC 使得编写单元测试变得更加容易,其自身代码的单元测试覆盖率达到 72%;大多数插件根本没有单元测试。(LiftSign 代码统计信息可在 此处 查看)
源代码
点击 仓库标签页 以找到 GitHub 链接。
Lift Signs is an open source plugin that allows your users to create "[Lift up]" and "[Lift down]" signs much like CraftBook. The point of this plugin is to provide this simple capability as a single plugin for those who want it without everything else that comes with CraftBook. Further this plugin is intentionally provided as open source so you are free to download, view and modify the source (GPL license), which is actually the primary reason it was written since the only other alternative today (SignLift) is a closed source plugin.
Installation
- Download LiftSign.jar and put into your plugins directory
- Restart or live-load using the excellent PlugMan or PluginReloader plugins
- Add permissions for your users (liftsign.normal.use and liftsign.normal.create)
Usage
Your users can create "[Lift up]", "[Lift down]" and "[Lift]" signs by putting those strings on the second line of the sign. Since this is designed to function exactly the same as CraftBook elevators, please refer to the CraftBook elevator wiki for examples.
Youtube demo video, courtesy of @IngrownPenguin:
Dev builds
- Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
- Jenkins
Why is the plugin file so big?
The basic reason is because I care more about good development practices and a maintainable plugin than I do about download size in the current age of fast networks.
LiftSign uses a development pattern known as Inversion Of Control (IoC) to make its code very flexible and easily testable. The use of the Google Guice IoC library adds size to shade into the plugin - the actual plugin code is only 20Kb, but the included libraries make it larger when shaded. The upshot is LiftSign uses well-tested common libraries and thanks to IoC making it easier to write unit tests, its own code is also well-tested at 72% unit test coverage; most plugins don't have any unit tests at all. (LiftSign code stats available here)
Source code
Click on the repository tab to find the github link.
评论 0
登录后参与评分
还没有评论,来抢沙发吧