diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-05-26 13:48:22 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-05-26 13:48:22 +0100 |
commit | 6903f2024217f0959c015e76b23297af8e3b573f (patch) | |
tree | 690bf275ce19c655bd64eea05be231ed0c318fd6 /src/main/java/net/minecraft/server/NetLoginHandler.java | |
parent | f463453d73249fe73cf3e23ed37e6cee870c8bf4 (diff) | |
download | craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar.gz craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar.lz craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar.xz craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.zip |
Implemented 1.6!
Diffstat (limited to 'src/main/java/net/minecraft/server/NetLoginHandler.java')
-rw-r--r-- | src/main/java/net/minecraft/server/NetLoginHandler.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/main/java/net/minecraft/server/NetLoginHandler.java b/src/main/java/net/minecraft/server/NetLoginHandler.java index 2b5f86eb..aa2637ee 100644 --- a/src/main/java/net/minecraft/server/NetLoginHandler.java +++ b/src/main/java/net/minecraft/server/NetLoginHandler.java @@ -19,7 +19,7 @@ public class NetLoginHandler extends NetHandler { public NetLoginHandler(MinecraftServer minecraftserver, Socket socket, String s) { this.server = minecraftserver; this.networkManager = new NetworkManager(socket, s, this); - this.networkManager.d = 0; + this.networkManager.f = 0; } // CraftBukkit start @@ -37,7 +37,7 @@ public class NetLoginHandler extends NetHandler { if (this.f++ == 600) { this.disconnect("Took too long to log in"); } else { - this.networkManager.a(); + this.networkManager.b(); } } @@ -45,7 +45,7 @@ public class NetLoginHandler extends NetHandler { try { a.info("Disconnecting " + this.b() + ": " + s); this.networkManager.a((Packet) (new Packet255KickDisconnect(s))); - this.networkManager.c(); + this.networkManager.d(); this.c = true; } catch (Exception exception) { exception.printStackTrace(); @@ -63,8 +63,8 @@ public class NetLoginHandler extends NetHandler { public void a(Packet1Login packet1login) { this.g = packet1login.name; - if (packet1login.a != 11) { - if (packet1login.a > 11) { + if (packet1login.a != 13) { + if (packet1login.a > 13) { this.disconnect("Outdated server!"); } else { this.disconnect("Outdated client!"); @@ -82,21 +82,21 @@ public class NetLoginHandler extends NetHandler { EntityPlayer entityplayer = this.server.serverConfigurationManager.a(this, packet1login.name); if (entityplayer != null) { + this.server.serverConfigurationManager.b(entityplayer); + entityplayer.a((World) this.server.a(entityplayer.dimension)); a.info(this.b() + " logged in with entity id " + entityplayer.id + " at (" + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")"); - ChunkCoordinates chunkcoordinates = entityplayer.world.getSpawn(); // CraftBukkit + WorldServer worldserver = this.server.a(entityplayer.dimension); + ChunkCoordinates chunkcoordinates = worldserver.getSpawn(); NetServerHandler netserverhandler = new NetServerHandler(this.server, this.networkManager, entityplayer); - netserverhandler.sendPacket(new Packet1Login("", entityplayer.id, entityplayer.world.getSeed(), (byte) entityplayer.world.worldProvider.dimension)); // CraftBukkit + netserverhandler.sendPacket(new Packet1Login("", entityplayer.id, worldserver.getSeed(), (byte) worldserver.worldProvider.dimension)); netserverhandler.sendPacket(new Packet6SpawnPosition(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z)); - if (((WorldServer) entityplayer.world).v()) { // CraftBukkit - netserverhandler.sendPacket(new Packet70Bed(1)); - } - + this.server.serverConfigurationManager.a(entityplayer, worldserver); // this.server.serverConfigurationManager.sendAll(new Packet3Chat("\u00A7e" + entityplayer.name + " joined the game.")); // CraftBukkit - message moved to join event - this.server.serverConfigurationManager.a(entityplayer); + this.server.serverConfigurationManager.c(entityplayer); netserverhandler.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch); this.server.networkListenThread.a(netserverhandler); - netserverhandler.sendPacket(new Packet4UpdateTime(entityplayer.world.getTime())); // CraftBukkit + netserverhandler.sendPacket(new Packet4UpdateTime(worldserver.getTime())); entityplayer.syncInventory(); } |