diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/NetLoginHandler.java')
-rw-r--r-- | src/main/java/net/minecraft/server/NetLoginHandler.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/main/java/net/minecraft/server/NetLoginHandler.java b/src/main/java/net/minecraft/server/NetLoginHandler.java index 97557a12..db4ad260 100644 --- a/src/main/java/net/minecraft/server/NetLoginHandler.java +++ b/src/main/java/net/minecraft/server/NetLoginHandler.java @@ -63,8 +63,8 @@ public class NetLoginHandler extends NetHandler { public void a(Packet1Login packet1login) { this.g = packet1login.name; - if (packet1login.a != 10) { - if (packet1login.a > 10) { + if (packet1login.a != 11) { + if (packet1login.a > 11) { this.disconnect("Outdated server!"); } else { this.disconnect("Outdated client!"); @@ -73,21 +73,24 @@ public class NetLoginHandler extends NetHandler { if (!this.server.onlineMode) { this.b(packet1login); } else { - (new ThreadLoginVerifier(this, packet1login, this.server.server)).start(); + (new ThreadLoginVerifier(this, packet1login, this.server.server)).start(); // CraftBukkit } } } public void b(Packet1Login packet1login) { - EntityPlayer entityplayer = this.server.serverConfigurationManager.a(this, packet1login.name, packet1login.c); + EntityPlayer entityplayer = this.server.serverConfigurationManager.a(this, packet1login.name); if (entityplayer != null) { a.info(this.b() + " logged in with entity id " + entityplayer.id); ChunkCoordinates chunkcoordinates = entityplayer.world.getSpawn(); // CraftBukkit 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, entityplayer.world.getSeed(), (byte) entityplayer.world.worldProvider.dimension)); // CraftBukkit netserverhandler.sendPacket(new Packet6SpawnPosition(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z)); + if (((WorldServer) entityplayer.world).v()) { // CraftBukkit + netserverhandler.sendPacket(new Packet70Bed(1)); + } // this.server.serverConfigurationManager.sendAll(new Packet3Chat("\u00A7e" + entityplayer.name + " joined the game.")); // CraftBukkit - message moved to join event this.server.serverConfigurationManager.a(entityplayer); netserverhandler.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch); @@ -112,6 +115,10 @@ public class NetLoginHandler extends NetHandler { return this.g != null ? this.g + " [" + this.networkManager.getSocketAddress().toString() + "]" : this.networkManager.getSocketAddress().toString(); } + public boolean c() { + return true; + } + static String a(NetLoginHandler netloginhandler) { return netloginhandler.i; } |