GithubHelp home page GithubHelp logo

wetabq / easyapi-nukkit Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 3.0 2.72 MB

Makes creating plugins easier

License: GNU General Public License v3.0

Kotlin 100.00%
java minecraft nukkit nukkit-plugin nukkitx nukkitx-plugin api framework

easyapi-nukkit's Introduction

EasyAPI-Nukkit

High-speed iteration

Make creating plugin easier

Java CI

简体中文

How to use?

Modularize Plugin

  • Support hot plug
  • Modules can be removed and installed at any time, and help modularize plugins
  • Reference practice:In anti-cheating,we need to modularize all of cheating check module, such as 'Speed' checking,we need to add MoveEvent listener in my plugin,add record a lot of params,and it also includes custom config. If you don't use EasyAPI to be modularize, all of these will be complicated. And when some server no longer used some of check pattern. If you don't use EasyAPI to be modularize, it is very difficult to be meticulous and modularize.

Directly use API

  • It convenient to debug, test or some simple plugin, that can reduce some unnecessary progress

Features

EasyAPI !

Async Event Provider

  • Kotlin Coroutine

    • Use Kotlin Coroutine to complete the high efficiency and laconic async event provider.
  • AsyncTask

    • Use Nukkit AsyncTask distribute each event trigger as a task,Nukkit don't need any return. So, just use, and enjoy the high efficiency

Listener Pipeline

  • The event processing is modularized into the listening pipeline of each step, and the processed data of each pipeline can be passed to the next-level listening pipeline, and the processing is modular, supports hot plugging, and supports async (also sync).

Integrated Interface & Free Modular Enable

  • Permission Groups

  • Command

  • Config

  • Economy

  • GUI

  • Bottom Tip Management

  • Chat Format Management

  • Top BossBar Management

  • Right Scoreboard Management

  • More····

    • Support any plugin to be EasyAPI interface module and integrated development

Integrated Module & Free Modular Enable

  • Bottom Tip Management
  • Chat Format Management
  • Top BossBar Management
  • Right Scoreboard Management
  • More···
    • Support any plugin to be EasyAPI module and integrated development

easyapi-nukkit's People

Contributors

colerar avatar wetabq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

easyapi-nukkit's Issues

[Feature] 集成 NPC 接口

Describe the solution you'd like

集成 NPC 接口, NPC 生成, 控制, 皮肤, 模型, 点击操作

Additional context

支持 4d 模型, 插件可获取控制接口

[BUG] 当字段中含有 List 等不支持类型时, ConfigGUI 无效

Describe the bug

当字段中含有 List 等不支持类型时, ConfigGUI 无效

Expected Behavior

通过注解标记不需要 ConfigGUI 加载的字段

Actual Behavior

没有注解, 直接报错

Steps to Reproduce

Screenshots

Version

Nukkit Version: Nukkit git-e4c0f7f
EasyAPI Version: [EasyAPI]EasyAPI - 1.1.3 - git-e4c0f7f by WetABQ

[Question] 此插件和PowerNukkit的兼容性?

本人在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导致问题?

[Feature] 添加箱子 + 原生 GUI 的集成

Is your feature request related to a problem? Please describe.

添加箱子 + 原生 GUI 的集成

Describe the solution you'd like

插件可以通过接口选择生成 GUI 界面还是 箱子界面 (例如win10版本就使用箱子操作)

[Feature] 提供 Nukkit 2.0 适配器

Is your feature request related to a problem? Please describe.

EasyAPI 目前不支持 Nukkit2.0

Describe the solution you'd like

提供 Nukkit2.0 适配器, 使得轻量级插件使用 EasyAPI 完成多平台适配

[Feature] Command 不够简单

Is your feature request related to a problem? Please describe.

CommandAPI 不够简单, 能继续简化

Describe the solution you'd like

继续简化 CommandAPI

[Feature] 完成 ScreenShow 轮替显示

Is your feature request related to a problem? Please describe.

ScreenShow 目前不支持轮替显示, 停留多帧

Describe the solution you'd like

完成 ScreenShow 轮替显示, 使得独占(Exclusive)的 Tip 或者 Popup 可以交替显示多帧

[Feature] 重构命令组件

Is your feature request related to a problem? Please describe.

重新设计EasyAPI命令组件,并使其以模块形式存在

[Feature] 浮空字 + 浮空字GUI

Describe the solution you'd like

添加浮空字 UI, 并用此作出类似 EaseCation 的浮空字 GUI
可以分类为: 浮空字Button Table Progress Pages 等 UI 组件

[Feature] PluginTask不够简单

Is your feature request related to a problem? Please describe.

PluginTask不够简单, 甚至可能比原生还繁复

Describe the solution you'd like

简化 PluginTask, 并且编写能简单依附于 EasyAPI 上的简易 PluginTask

[Feature] SimpleCodecConfig 似乎还能继续简化

Is your feature request related to a problem? Please describe.

SimpleCodecConfig 似乎还能继续简化

Describe the solution you'd like

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.