mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-22 18:26:08 +01:00
Fix Asynchronous command dispatch!
(PaperMC) (SD-7259)
Bukkit API calls need to be done syncronous. There are possibly some more async calls to the API that we didn't discover until now
This commit is contained in:
parent
c367287ffa
commit
d9af9a06d8
@ -276,9 +276,11 @@ public class IslandManager {
|
|||||||
Bukkit.getServer().getScheduler().runTaskLater(plugin, () ->
|
Bukkit.getServer().getScheduler().runTaskLater(plugin, () ->
|
||||||
plugin.getBiomeManager().setBiome(island, IslandWorld.Normal, compatibleBiome, () -> {
|
plugin.getBiomeManager().setBiome(island, IslandWorld.Normal, compatibleBiome, () -> {
|
||||||
if (structure.getCommands() != null) {
|
if (structure.getCommands() != null) {
|
||||||
|
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
|
||||||
for (String commandList : structure.getCommands()) {
|
for (String commandList : structure.getCommands()) {
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), commandList.replace("%player", player.getName()));
|
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), commandList.replace("%player", player.getName()));
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}), 20L);
|
}), 20L);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user