Muska-Ami / CatSero

一个基于MiraiMC的QQ群功能&MC功能插件
https://blog.ovome.icu
GNU Affero General Public License v3.0
29 stars 3 forks source link

/cms 报错java.util.NoSuchElementException #124

Closed Zhou-Shilin closed 1 year ago

Zhou-Shilin commented 1 year ago

问题描述

使用/cms指令向q群内发送消息时报错java.util.NoSuchElementException

复现方法

  1. 控制台输入指令/cms <qq> <group_id> <msg>
  2. 获得报错

服务端版本

Paper-1.18.2

CatSero 版本

2.3.3

服务端日志

[17:45:10 WARN]: [CatSero] [Catch] 捕获到一个错误
[17:45:10 WARN]: [CatSero] [Catch] 错误类型: java.util.NoSuchElementException
[17:45:10 WARN]: [CatSero] [Catch] 捕获消息: 0
[17:45:10 WARN]: [CatSero] [Catch] 详细信息:      - MiraiMC-Bukkit.jar//net.mamoe.mirai.Bot$Companion.getInstance(Bot.kt:215)
     - MiraiMC-Bukkit.jar//net.mamoe.mirai.Bot.getInstance(Bot.kt)
     - MiraiMC-Bukkit.jar//me.dreamvoid.miraimc.api.MiraiBot.<init>(MiraiBot.java:45)
     - MiraiMC-Bukkit.jar//me.dreamvoid.miraimc.api.MiraiBot.getBot(MiraiBot.java:73)
     - CatSero-2.3.3.jar//moe.xmcn.catsero.utils.MessageSender.sendGroup(MessageSender.java:42)
     - CatSero-2.3.3.jar//moe.xmcn.catsero.executors.cms.OnCommand.onCommand(OnCommand.java:49)
     - org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
     - org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
     - org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:906)
     - org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchServerCommand(CraftServer.java:869)
     - net.minecraft.server.dedicated.DedicatedServer.be(DedicatedServer.java:510)
     - net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:484)
     - net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1456)
     - net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1226)
     - net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316)
     - java.base/java.lang.Thread.run(Thread.java:833)

[17:45:10 WARN]: [CatSero] [Catch] 如您认为这不是配置错误、网络原因导致的问题,请前往此处报告:
[17:45:10 WARN]: [CatSero] [Catch] https://github.com/XiaMoHuaHuo-CN/CatSero/issues

额外说明

修改了MiraiMC的配置文件,目前使用的Mirai版本是2.15.0-M1(Pre-Release) 系统版本是Windows Server 2022 使用Java17

Muska-Ami commented 1 year ago

使用方法不对捏

Muska-Ami commented 1 year ago

cms <botid> <groupid> <msg>