LightAPI LightAPI Fork 隐藏光源的API ┃ 简介 | 一个简单的创建隐藏光源的轻量级库(Library) 原作名为LightAPI,支持版本1.8-1.11 接坑者更名为LightAPI Fork,支持版本1.8-1.15 请下载并使用LightAPI Fork,LightAPI原作者已弃坑 目前系列下载量已经超过4.5W |
┃ 功能 | - 创建、删除隐藏光源
- 支持插件nuNPCDestinations
- 支持插件HatMeEnhanced
- 支持插件VarLight
- 支持插件ShinyItems
- 支持插件Quality Armory
- 支持插件AddLight
还有更多,大部分支持光源的插件都与之有关LightAPI的兼容性:请选择LightAPI Fork以获得更多支持(MC1.8-1.15) CraftBukkit/Spigot 1.8.8-1.10 Paper 1.8.8 Paper 1.9+ Tacospigot 1.9+ Cauldron 1.7.10 [测试支持]
|
┃ 用法 | 基本模式: -LightAPI createLight创建光源(World世界,blockX坐标X,blockY坐标Y,blockZ坐标Z,light level光照等级,async异步); -在此特定坐标和灯光级别上创建灯光。如果async state设置为“true”,那么将创建异步请求并将其添加到处理队列中。 - LightAPI.createLight(location.getWorld(),
复制代码如果你添加了坐标,则可以使用 - LightAPI.createLight(location, 15, true);
复制代码deleteLight(World,blockX,blockY,blockZ,async); -删除此位置上的灯光。 如果async state设置为“true”,那么将创建异步请求并将其添加到处理队列中。 - LightAPI.deleteLight(location.getWorld(), location.getBlockX(), location.getBlockY(), location.getBlockZ(), true);
复制代码如果你添加了坐标,则可以使用 - LightAPI.deleteLight(location, true)
复制代码collectChunks(Location loc); - 收集并回退一个更改了的区块列表 - LightAPI.collectChunks(player.getLocation());
复制代码updateChunk(ChunkInfo info); - 发送更改区块的玩家 - LightAPI.updateChunk(info);
复制代码 高级模式需要SeverModManager3.0+ Starting with version 3.0+ developers can add their own implementation NMSHandler for other CraftBukkit implementations.
| | registerServerMod(ServerModInfo info); - Registration of the new platform. ServerModInfo contains a map with classes for initialization NMSHandler under the version of CraftBukkit implementation. - // Example code from LightAPI 3.0.0
- ServerModInfo spigot = new ServerModInfo("Spigot");
- spigot.getVersions().put("v1_8_R3", CraftBukkit_v1_8_R3.class);
- spigot.getVersions().put("v1_9_R1", CraftBukkit_v1_9_R1.class);
- spigot.getVersions().put("v1_9_R2", CraftBukkit_v1_9_R2.class);
- spigot.getVersions().put("v1_10_R1", CraftBukkit_v1_10_R1.class);
- ServerModManager.registerServerMod(spigot);
复制代码unregisterServerMod(String modName); - Unregistration of CraftBukkit implementation. - ServerModManager.unregisterServerMod("Spigot");
复制代码getNMSHandler(); - initialized NMSHandler after enable main plugin. - ServerModManager.getNMSHandler();
复制代码 事件命令 - /lightapi - 主要命令 - /lightapi update - 检测更新 |
|
┃ 配置 | # LightAPI v3.2.0-dev 版配置,仅供参考 #作者——BeYkeRYkt version: 3 #版本,勿动 update-delay-ticks: 2 #多少tick检测1次 max-iterations-per-tick: 400 #每tick检测几次 updater: enable: true #是否自动更新 repo: BeYkeRYkt/LightAPI update-delay-ticks: 40 view-changelog: false #开启日志 |
|