diff --git a/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/async/entitytracker/MultithreadedEntityTracker.java b/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/async/entitytracker/MultithreadedEntityTracker.java index 5a57c9e2..a81ae895 100644 --- a/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/async/entitytracker/MultithreadedEntityTracker.java +++ b/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/async/entitytracker/MultithreadedEntityTracker.java @@ -7,8 +7,10 @@ import ga.windpvp.windspigot.async.AsyncUtil; import ga.windpvp.windspigot.config.WindSpigotConfig; import me.rastrian.dev.utils.IndexedLinkedHashSet; +import net.minecraft.server.EntityPlayer; import net.minecraft.server.EntityTracker; import net.minecraft.server.EntityTrackerEntry; +import net.minecraft.server.MinecraftServer; import net.minecraft.server.WorldServer; public class MultithreadedEntityTracker extends EntityTracker { @@ -43,6 +45,9 @@ public void updatePlayers() { e.printStackTrace(); } worldServer.ticker.getLatch().reset(); + for (EntityPlayer player : MinecraftServer.getServer().getPlayerList().players) { + player.playerConnection.sendQueuedPackets(); + } } public static ExecutorService getExecutor() { diff --git a/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/world/WorldTickManager.java b/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/world/WorldTickManager.java index dc51d217..26565104 100644 --- a/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/world/WorldTickManager.java +++ b/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/world/WorldTickManager.java @@ -5,6 +5,7 @@ import co.aikar.timings.SpigotTimings; import ga.windpvp.windspigot.config.WindSpigotConfig; +import net.minecraft.server.EntityPlayer; import net.minecraft.server.MinecraftServer; import net.minecraft.server.WorldServer; @@ -60,6 +61,9 @@ private void tickWorlds() { ticker.worldserver.timings.tracker.stopTiming(); ticker.getLatch().reset(); } + for (EntityPlayer player : MinecraftServer.getServer().getPlayerList().players) { + player.playerConnection.sendQueuedPackets(); + } } // Move BukkitScheduler stuff here so async entity tracking does not interfere