6 Commits

Author SHA1 Message Date
12740c64e3 Update event to v1.2.2-dev 2022-07-10 20:58:10 +08:00
a1ef41f373 Update version to v1.2.4 2022-07-10 20:57:48 +08:00
1ec9e3f09a Update README.md 2022-07-10 12:34:52 +08:00
1a3b2e4904 Merge pull request #7 from realqhc/master
fix issue from grasscutter upgrade
2022-06-24 12:39:00 +08:00
957098a2cf Update version to v1.2.3 2022-06-24 12:37:25 +08:00
Qihan Cai
910842c460 fix issue from grasscutter upgrade 2022-06-24 14:20:30 +10:00
4 changed files with 11 additions and 3 deletions

View File

@@ -7,6 +7,14 @@
## 服务端安装
1. 在 [Release](https://github.com/jie65535/gc-opencommand-plugin/releases) 下载 `jar`
2. 放入 `plugins` 文件夹即可
> 注意,如果出现以下错误:
> ```log
> INFO:PluginManager Enabling plugin: opencommand-plugin
> Exception in thread "main" java.lang.NoSuchMethodError: 'void emu.grasscutter.server.event.EventHandler.register(emu.grasscutter.plugin.Plugin)'
> at com.github.jie65535.opencommand.OpenCommandPlugin.onEnable(OpenCommandPlugin.java:49)
> at emu.grasscutter.plugin.PluginManager.lambda$enablePlugins$3(PluginManager.java:131)
> ```
> 请使用v1.2.1版本插件,因为该报错表示你的服务端是旧版!
## 控制台连接
1. 首次启动时,会在 `plugins` 目录下生成一个 `opencommand-plugin` 目录,打开并编辑 `config.json`

View File

@@ -4,7 +4,7 @@ plugins {
}
group 'com.github.jie65535.opencommand'
version 'dev-1.2.2'
version 'dev-1.2.4'
sourceCompatibility = 17
targetCompatibility = 17

View File

@@ -46,7 +46,7 @@ public final class OpenCommandPlugin extends Plugin {
new EventHandler<>(ReceiveCommandFeedbackEvent.class)
.priority(HandlerPriority.HIGH)
.listener(EventListeners::onCommandResponse)
.register();
.register(this);
getHandle().addRouter(OpenCommandHandler.class);
getLogger().info("[OpenCommand] Enabled");
}

View File

@@ -1,7 +1,7 @@
{
"name": "opencommand-plugin",
"description": "Open command interface for third-party clients",
"version": "dev-1.2.2",
"version": "dev-1.2.4",
"mainClass": "com.github.jie65535.opencommand.OpenCommandPlugin",
"authors": ["jie65535"]
}