DreamVoid / MiraiMC

适用于Minecraft服务器的Mirai机器人
https://docs.miraimc.dreamvoid.me
GNU Affero General Public License v3.0
182 stars 15 forks source link

在Velocity使用时会加载失败 #533

Closed zhuyanlei2010 closed 2 months ago

zhuyanlei2010 commented 2 months ago

问题描述

使用时直接放入Plugins,加载失败,并发出报错

复现方法

  1. 丢入Velocity的Plugin文件夹
  2. 运行Velocity
  3. 报错

服务端类型

Velocity

服务端版本

Velocity-3.3.0

MiraiMC 插件版本

1.9pre2

服务端日志

"C:\Program Files\Java\jdk-17.0.2\bin\java.exe" -Xmx8000M -Xms8000M -jar velocity-3.3.0-SNAPSHOT-316.jar
[14:05:07 INFO]: Booting up Velocity 3.3.0-SNAPSHOT (git-9d25d309-b400)...
[14:05:07 INFO]: Loading localizations...
[14:05:08 INFO]: Connections will use NIO channels, Java compression, Java ciphers
[14:05:08 WARN]: The proxy is running in offline mode! This is a security risk and you will NOT receive any support!
[14:05:08 INFO]: Loading plugins...
[14:05:08 INFO] [miraimc]: Preparing MiraiMC start-up.
[14:05:08 INFO] [miraimc]: Start-up tasks finished.
[14:05:08 INFO]: Loaded plugin miraimc 1.9-pre2 by DreamVoid
[14:05:08 INFO]: Loaded 1 plugins
[14:05:08 INFO] [miraimc]: Preparing MiraiMC pre-load.
[14:05:08 INFO] [miraimc]: Loading config.
[14:05:08 ERROR] [miraimc]: 加载 MiraiMC 阶段 1 时出现异常!
[14:05:08 ERROR] [miraimc]: 如果你确信这是 MiraiMC 的错误,前往 GitHub 报告 issue 并附上完整服务器日志。
[14:05:08 ERROR] [miraimc]: java.lang.IllegalStateException: bot.register-encrypt-service is not a boolean value
[14:05:08 ERROR] [miraimc]:     at me.dreamvoid.miraimc.velocity.VelocityConfig.getBoolean(VelocityConfig.java:128)
[14:05:08 ERROR] [miraimc]:     at me.dreamvoid.miraimc.velocity.VelocityConfig.loadConfig(VelocityConfig.java:164)
[14:05:08 ERROR] [miraimc]:     at me.dreamvoid.miraimc.internal.config.PluginConfig.reloadConfig(PluginConfig.java:13)
[14:05:08 ERROR] [miraimc]:     at me.dreamvoid.miraimc.LifeCycle.preLoad(LifeCycle.java:62)
[14:05:08 ERROR] [miraimc]:     at me.dreamvoid.miraimc.velocity.VelocityPlugin.onProxyInitialization(VelocityPlugin.java:81)
[14:05:08 ERROR] [miraimc]:     at me.dreamvoid.miraimc.velocity.Lmbda$1.execute(null:-1)
[14:05:08 ERROR] [miraimc]:     at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56)
[14:05:08 ERROR] [miraimc]:     at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598)
[14:05:08 ERROR] [miraimc]:     at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479)
[14:05:08 ERROR] [miraimc]:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[14:05:08 ERROR] [miraimc]:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[14:05:08 ERROR] [miraimc]:     at java.lang.Thread.run(Thread.java:833)
[14:05:08 INFO] [miraimc]: Preparing MiraiMC post-load.
[14:05:08 INFO] [miraimc]: Initializing SQLite database.
[14:05:09 INFO] [miraimc]: Downloading https://repo.huaweicloud.com/repository/maven/com/zaxxer/HikariCP/5.1.0/HikariCP-5.1.0.jar
[14:05:09 INFO] [MiraiMC-LibraryLoader]: Loading library plugins\miraimc\libraries\HikariCP-5.1.0.jar
[14:05:09 INFO] [miraimc]: Downloading https://repo.huaweicloud.com/repository/maven/org/xerial/sqlite-jdbc/3.36.0.3/sqlite-jdbc-3.36.0.3.jar
[14:05:09 INFO] [MiraiMC-LibraryLoader]: Loading library plugins\miraimc\libraries\sqlite-jdbc-3.36.0.3.jar
[14:05:09 INFO] [com.zaxxer.hikari.HikariDataSource]: MiraiMC-SQLite - Starting...
[14:05:10 INFO] [com.zaxxer.hikari.pool.HikariPool]: MiraiMC-SQLite - Added connection org.sqlite.jdbc4.JDBC4Connection@7cb02740
[14:05:10 INFO] [com.zaxxer.hikari.HikariDataSource]: MiraiMC-SQLite - Start completed.
[14:05:10 INFO] [miraimc]: Starting Mirai-Event listener.
[14:05:10 ERROR] [miraimc]: 加载 MiraiMC 阶段 2 时出现异常!
[14:05:10 ERROR] [miraimc]: 如果你确信这是 MiraiMC 的错误,前往 GitHub 报告 issue 并附上完整服务器日志。
[14:05:10 ERROR] [miraimc]: java.lang.NullPointerException: Cannot invoke "me.dreamvoid.miraimc.IMiraiEvent.startListenEvent()" because the return value of "me.dreamvoid.miraimc.Platform.getMiraiEvent()" is null
[14:05:10 ERROR] [miraimc]:     at me.dreamvoid.miraimc.LifeCycle.postLoad(LifeCycle.java:137)
[14:05:10 ERROR] [miraimc]:     at me.dreamvoid.miraimc.velocity.VelocityPlugin.onProxyInitialization(VelocityPlugin.java:91)
[14:05:10 ERROR] [miraimc]:     at me.dreamvoid.miraimc.velocity.Lmbda$1.execute(null:-1)
[14:05:10 ERROR] [miraimc]:     at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56)
[14:05:10 ERROR] [miraimc]:     at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598)
[14:05:10 ERROR] [miraimc]:     at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479)
[14:05:10 ERROR] [miraimc]:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[14:05:10 ERROR] [miraimc]:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[14:05:10 ERROR] [miraimc]:     at java.lang.Thread.run(Thread.java:833)
[14:05:10 INFO]: Listening on /[0:0:0:0:0:0:0:0]:25578
[14:05:10 INFO]: Done (3.49s)!

额外说明

No response

协议

DreamVoid commented 2 months ago

https://github.com/DreamVoid/MiraiMC/blob/main/MiraiMC-Base%2Fsrc%2Fmain%2Fresources%2Fconfig.yml 参照配置文件移除不存在的配置项

zhuyanlei2010 commented 2 months ago

Velocity有HTTPAPi吗

DreamVoid commented 2 months ago

Velocity有HTTPAPi吗

不会有了

zhuyanlei2010 commented 2 months ago

我将整段复制过去了,报错依旧

DreamVoid commented 2 weeks ago

我将整段复制过去了,报错依旧

使用1.9-pre3