wetabq / easyapi-nukkit Goto Github PK
View Code? Open in Web Editor NEWMakes creating plugins easier
License: GNU General Public License v3.0
Makes creating plugins easier
License: GNU General Public License v3.0
Config 组件以注解形式重新设计,并以 Config 解析模块形式存在
更简单并且适配Java的异步Nukkit事件调用
通过 AsyncListener 接口实现Nukkit异步事件调用
EasyAPI 目前不支持 Nukkit2.0
提供 Nukkit2.0 适配器, 使得轻量级插件使用 EasyAPI 完成多平台适配
重构API组件
自动更新插件, 自动下载插件依赖.
添加浮空字 UI, 并用此作出类似 EaseCation 的浮空字 GUI
可以分类为: 浮空字Button Table Progress Pages 等 UI 组件
基于DbLibX实现对Config到MySQL数据库的无缝对接
集成 NPC 接口, NPC 生成, 控制, 皮肤, 模型, 点击操作
支持 4d 模型, 插件可获取控制接口
重新设计EasyAPI命令组件,并使其以模块形式存在
ScreenShow 支持记分板和Bossbar
什么时候能通过easyapi自定义合成表
当字段中含有 List 等不支持类型时, ConfigGUI 无效
通过注解标记不需要 ConfigGUI 加载的字段
没有注解, 直接报错
Nukkit Version: Nukkit git-e4c0f7f
EasyAPI Version: [EasyAPI]EasyAPI - 1.1.3 - git-e4c0f7f by WetABQ
重新设计 PlaceHolder 这一API组件
CommandAPI 不够简单, 能继续简化
继续简化 CommandAPI
SimpleCodecConfig 似乎还能继续简化
public static PlayerHealth getPlayerHealth(String player){
SimpleCodecEasyConfig<PlayerHealth> config = module.config;
LinkedHashMap<String,PlayerHealth> healths = config.getSimpleConfig();
if(!healths.containsKey(player)){
healths.put(player,new PlayerHealth(player,20,20,new LinkedHashMap<>()));
config.save();
}
return healths.get(player);
}
可以看到, get这一流程可以嵌入至 EasyAPI
添加箱子 + 原生 GUI 的集成
插件可以通过接口选择生成 GUI 界面还是 箱子界面 (例如win10版本就使用箱子操作)
EasyAPI 使用教程 [中文], wiki, 插件使用教程
完成 Listener Pipeline
PluginTask不够简单, 甚至可能比原生还繁复
简化 PluginTask, 并且编写能简单依附于 EasyAPI 上的简易 PluginTask
本人在Nukkit 1.4.0.0-PN (git-4f0f314) 版本 "PowerNukkit" (API 1.0.12)
上运行插件时,出现大量NoClassDefFoundError,指向top.wetabq.easyapi.api.defaults.PermissionGroupAPI
以下为PowerNukkit的BugReport:
java.lang.NoClassDefFoundError: Could not initialize class top.wetabq.easyapi.api.defaults.PermissionGroupAPI
at top.wetabq.easyapi.module.defaults.ChatNameTagFormatModule$moduleRegister$nameTagFormatter$1.format(ChatNameTagFormatModule.kt:69)
at top.wetabq.easyapi.module.defaults.ChatNameTagFormatModule$moduleRegister$nameTagFormatter$1.format(ChatNameTagFormatModule.kt:60)
at top.wetabq.easyapi.api.defaults.MessageFormatter$DefaultImpls.parseFormat(MessageFormatAPI.kt:58)
at top.wetabq.easyapi.module.defaults.ChatNameTagFormatModule$moduleRegister$nameTagFormatter$1.parseFormat(ChatNameTagFormatModule.kt:60)
at top.wetabq.easyapi.api.defaults.MessageFormatAPI.format(MessageFormatAPI.kt:17)
at top.wetabq.easyapi.module.defaults.ChatNameTagFormatModule$moduleRegister$1$onJoinEvent$1.invoke(ChatNameTagFormatModule.kt:100)
at top.wetabq.easyapi.module.defaults.ChatNameTagFormatModule$moduleRegister$1$onJoinEvent$1.invoke(ChatNameTagFormatModule.kt:89)
at top.wetabq.easyapi.module.defaults.AsyncListenerModuleKt$asyncTaskCallEvent$2.onRun(AsyncListenerModule.kt:29)
at cn.nukkit.scheduler.AsyncTask.run(AsyncTask.java:25)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)
这些错误大多都指向KotlinLib,但是KotlinLib已经安装:
2021-06-05 11:26:53.440 [main] INFO - 開啟中... PowerNukkit v1.4.0.0-PN
2021-06-05 11:26:53.549 [main] INFO - 讀取中... KotlinLib v1.4.31
2021-06-05 11:26:53.567 [main] INFO - 讀取中... MobPlugin v1.19.0
2021-06-05 11:26:53.574 [main] INFO - 讀取中... EasyAPI v1.1.12.0
2021-06-05 11:26:53.601 [main] INFO - 讀取中... ScoreboardPlugin v1.0
2021-06-05 11:26:53.668 [main] INFO - 讀取中... GameAPI v1.0.0-ALPHA
2021-06-05 11:26:53.672 [main] INFO - 讀取中... EconomyAPI v2.0.1
2021-06-05 11:26:53.694 [main] INFO - 讀取中... PlaceholderAPI v1.3.3
2021-06-05 11:26:53.744 [main] INFO - 讀取中... ChainMining v1.2.0
2021-06-05 11:26:53.753 [main] INFO - [ChainMining]: §aLanguage: zh_CN loaded !
2021-06-05 11:26:53.775 [main] INFO - [ChainMining]: §aLanguage: en_US loaded !
2021-06-05 11:26:53.778 [main] INFO - 讀取中... XiaoOnline v1.1.1
2021-06-05 11:26:53.782 [main] INFO - 讀取中... LuckPerms v5.3.42
2021-06-05 11:26:54.220 [main] INFO - 讀取中... FakeInventories v1.0.3
2021-06-05 11:26:54.234 [main] INFO - 讀取中... PepperShop vPN1.3.2
2021-06-05 11:26:54.237 [main] INFO - 讀取中... Land v1.5.5
2021-06-05 11:26:54.241 [main] INFO - 讀取中... BlocklyNukkit v1.2.9.3
所以是否该插件无法兼容PowerNukkit导致问题?
降低模块之间互操作的难度和减少模块硬编码
ScreenShow 目前不支持轮替显示, 停留多帧
完成 ScreenShow 轮替显示, 使得独占(Exclusive)的 Tip 或者 Popup 可以交替显示多帧
bStats支持
How do I use this plugin?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.