Skip to content

Commit

Permalink
fix(fabric): 呜呜,注册了两遍Listener
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlimiter committed Mar 11, 2024
1 parent 952078a commit 4788fa8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 47 deletions.
2 changes: 1 addition & 1 deletion fabric/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
org.gradle.jvmargs=-Xmx8G

# Mod Properties
mod_version=2.2.0.1
mod_version=2.2.1.1
maven_group=cn.evole.mods
archives_base_name=McBot-fabric

Expand Down
3 changes: 1 addition & 2 deletions fabric/src/main/java/cn/evole/mods/mcbot/McBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public void onServerStarted(MinecraftServer server) {
if (ModConfig.INSTANCE.getCommon().isAutoOpen()) {
onebot = OneBotClient.create(ModConfig.INSTANCE.getBotConfig().build()).open().registerEvents(new IBotEvent());
}
if (onebot != null) onebot.getEventsBus().register(new IBotEvent());
CustomCmdHandler.INSTANCE.load();//自定义命令加载
CQUtilsExecutor = Executors.newSingleThreadExecutor(); // 创建CQ码处理线程池
}
Expand All @@ -103,8 +102,8 @@ public void onServerStopping(MinecraftServer server) {
}

public void onServerStopped(MinecraftServer server) {
if (onebot != null) onebot.close();
CQUtilsExecutor.shutdownNow();
if (onebot != null) onebot.close();
}

}
44 changes: 0 additions & 44 deletions fabric/src/main/java/cn/evole/mods/mcbot/util/MessageThread.java

This file was deleted.

0 comments on commit 4788fa8

Please sign in to comment.