fix(ball-bukkit): 修复执行指令时的异步异常
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "cn.hamster3.mc.plugin"
|
||||
version = "1.5.3"
|
||||
version = "1.5.4"
|
||||
|
||||
subprojects {
|
||||
apply {
|
||||
|
Reference in New Issue
Block a user