Chunk Compression on seperate thread. Thanks to Zeerix.

This commit is contained in:
Rigby
2011-07-26 17:03:52 +01:00
committed by EvilSeph
parent 85805e53a3
commit 6ae23e3f03
5 changed files with 149 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ import java.util.logging.Logger;
// CraftBukkit start
import org.bukkit.ChatColor;
import org.bukkit.craftbukkit.ChunkCompressionThread;
import org.bukkit.craftbukkit.command.ColouredConsoleSender;
import org.bukkit.Location;
import org.bukkit.command.CommandException;
@@ -629,6 +630,10 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
this.networkManager.queue(new Packet3Chat(line));
}
packet = null;
} else if (packet.k == true) {
// Reroute all low-priority packets through to compression thread.
ChunkCompressionThread.sendPacket(this.player, packet);
packet = null;
}
if (packet != null) this.networkManager.queue(packet);
// CraftBukkit end