fix(ball-bukkit): 修复执行指令时的异步异常

This commit is contained in:
2024-03-02 18:06:37 +08:00
parent 419229ff15
commit 41ea7ade9c
2 changed files with 4 additions and 4 deletions

View File

@@ -101,7 +101,7 @@ public class BallBukkitListener implements Listener {
if (event.getServerID() != null && !BallAPI.getInstance().isLocalServer(event.getServerID())) {
return;
}
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), event.getCommand());
HamsterBallPlugin.sync(() -> Bukkit.dispatchCommand(Bukkit.getConsoleSender(), event.getCommand()));
}
@Subscribe
@@ -114,11 +114,11 @@ public class BallBukkitListener implements Listener {
if (player == null) {
return;
}
Bukkit.dispatchCommand(player, event.getCommand());
HamsterBallPlugin.sync(() -> Bukkit.dispatchCommand(player, event.getCommand()));
return;
}
for (Player player : Bukkit.getOnlinePlayers()) {
Bukkit.dispatchCommand(player, event.getCommand());
HamsterBallPlugin.sync(() -> Bukkit.dispatchCommand(player, event.getCommand()));
}
}

View File

@@ -5,7 +5,7 @@ plugins {
}
group = "cn.hamster3.mc.plugin"
version = "1.5.3"
version = "1.5.4"
subprojects {
apply {