Async chat thread call fix

This commit is contained in:
Esophose 2019-04-28 14:57:59 -06:00
parent 5dd22e771e
commit 0006946ba2

View file

@ -44,8 +44,8 @@ public class PlayerChatHook extends BukkitRunnable implements Listener {
for (PlayerChatHookData hook : hooks) {
if (hook.getPlayerUUID().equals(event.getPlayer().getUniqueId())) {
event.setCancelled(true);
hook.triggerCallback(event.getMessage());
hooks.remove(hook);
Bukkit.getScheduler().scheduleSyncDelayedTask(PlayerParticles.getPlugin(), () -> hook.triggerCallback(event.getMessage()));
return;
}
}