1.18.2: SimpleCommand
Bruce0203 opened this issue · comments
Lee Jong-won commented
org.mineacademy.fo.command.SimpleCommand
has args
field but if code of below executed, the bug appeared because it is not thread-safe
is this problem ?
for (int i = 0; i < 100; i++) {
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
player.performCommand("command");
});
}
Matej commented
It's a faulty code. If anything it should be:
Bukkit.getScheduler().runTaskLater(plugin, () -> {
for (int i = 0; i < 100; i++)
player.performCommand("command");
});
Matej commented
Bukkit does not properly supports running commands async anyways.