mirror of
https://github.com/jie65535/gc-opencommand-plugin.git
synced 2025-12-15 19:31:35 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12740c64e3 | |||
| a1ef41f373 | |||
| 1ec9e3f09a | |||
| 1a3b2e4904 | |||
| 957098a2cf | |||
|
|
910842c460 |
@@ -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`
|
||||
|
||||
@@ -4,7 +4,7 @@ plugins {
|
||||
}
|
||||
|
||||
group 'com.github.jie65535.opencommand'
|
||||
version 'dev-1.2.2'
|
||||
version 'dev-1.2.4'
|
||||
|
||||
sourceCompatibility = 17
|
||||
targetCompatibility = 17
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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"]
|
||||
}
|
||||
Reference in New Issue
Block a user