}
return false;
}
public static boolean updatePlayerConnection(Player player) {
CraftPlayer cp = (CraftPlayer) player;
CraftServer server = (CraftServer) Bukkit.getServer();
if (!(cp.getHandle().playerConnection instanceof SpoutPlayerConnection)) {
PlayerConnection oldHandler = cp.getHandle().playerConnection;
Location loc = player.getLocation();
SpoutPlayerConnection handler = new SpoutPlayerConnection(MinecraftServer.getServer(), cp.getHandle().playerConnection.networkManager, cp.getHandle());
/*for (Object o : cp.getHandle().playerChunkCoordIntPairs) {
ChunkCoordIntPair c = (ChunkCoordIntPair) o;
handler.addActiveChunk(c);
}*/
handler.a(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
cp.getHandle().playerConnection = handler;
INetworkManager nm = cp.getHandle().playerConnection.networkManager;
setPlayerConnection(nm, cp.getHandle().playerConnection);
Field handlerList = null;
try {
handlerList = ServerConnection.class.getDeclaredField("c");
handlerList.setAccessible(true);
ServerConnection sc = ((DedicatedServer) MinecraftServer.getServer()).ag();