我用同样的指令结构和文件结构写了两个插件,我是用在两个不同的机器人上的,使用没有问题,但是放在同一个 Mirai Console里面,就会出现奇怪的问题。
setu
private PluginMain() {
super(new JvmPluginDescriptionBuilder("com.ycitus.setu", "3.5.0")
.name("Setu")
.author("ycitus")
.build());
}
mcping
private MinecraftPing() {
super(new JvmPluginDescriptionBuilder("com.ycitus.MinecraftPing", "1.0-SNAPSHOT")
.name("MinecraftPing")
.author("Ycitus")
.build());
}
日志
2021-09-08 16:38:49 I/MinecraftPing: MinecraftPing >> Enable.
2021-09-08 16:38:49 I/MinecraftPing: Start Init...
2021-09-08 16:38:49 I/MinecraftPing: [FileSystem] Init FileSystem.
2021-09-08 16:38:49 I/MinecraftPing: [FileSystem] Init All Configs...
2021-09-08 16:38:49 I/MinecraftPing: [FileSystem] Init >> ApplicationConfig.json
2021-09-08 16:38:49 I/MinecraftPing: [FileSystem] Load Local File to Memory >> ApplicationConfig.json
2021-09-08 16:38:49 I/MinecraftPing: [CommandSystem] Init CommandSystem.
2021-09-08 16:38:49 I/MinecraftPing: [TimerSystem] Start TimerSystem.
2021-09-08 16:38:49 I/MinecraftPing: McPing End Init...
2021-09-08 16:38:49 I/MinecraftPing: Setu >> Enable.
2021-09-08 16:38:49 I/MinecraftPing: Start Init...
2021-09-08 16:38:49 I/MinecraftPing: [FileSystem] Init FileSystem.
2021-09-08 16:38:49 I/MinecraftPing: [CommandSystem] Init CommandSystem.
2021-09-08 16:38:49 I/MinecraftPing: End Init...
可以看到,写在setu的onEnable()函数里的输出显示输出插件为mcping
同时setu插件的功能也无法正常使用,监听事件失效。
有没有大佬知道是为什么