summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/net/minecraft/server/EntityPlayer.java7
-rw-r--r--src/main/java/net/minecraft/server/PlayerConnection.java2
-rw-r--r--src/main/java/net/minecraft/server/PlayerList.java8
3 files changed, 14 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index d90ddb71..8d98a706 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -61,6 +61,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public int newTotalExp = 0;
public boolean keepLevel = false;
public double maxHealthCache;
+ public boolean joining = true;
// CraftBukkit end
public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) {
@@ -159,6 +160,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
public void h() {
+ // CraftBukkit start
+ if (this.joining) {
+ this.joining = false;
+ }
+ // CraftBukkit end
+
this.playerInteractManager.a();
--this.invulnerableTicks;
if (this.noDamageTicks > 0) {
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 10c2ee72..ca6b33c9 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1850,7 +1850,7 @@ public class PlayerConnection implements PacketPlayInListener {
// CraftBukkit start - Add "isDisconnected" method
public final boolean isDisconnected() {
- return !NetworkManager.a(this.networkManager).config().isAutoRead();
+ return !this.player.joining && !NetworkManager.a(this.networkManager).config().isAutoRead();
}
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 1943dbf0..5b0590e7 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -83,8 +83,8 @@ public abstract class PlayerList {
s = networkmanager.getSocketAddress().toString();
}
- // CraftBukkit - add world to 'logged in' message.
- c.info(entityplayer.getName() + "[" + s + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "] " + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")");
+ // CraftBukkit - Moved message to after join
+ // c.info(entityplayer.getName() + "[" + s + "] logged in with entity id " + entityplayer.getId() + " at (" + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")");
WorldServer worldserver = this.server.getWorldServer(entityplayer.dimension);
ChunkCoordinates chunkcoordinates = worldserver.getSpawn();
@@ -114,6 +114,7 @@ public abstract class PlayerList {
this.sendMessage(chatmessage);
// CraftBukkit end*/
this.c(entityplayer);
+ worldserver = this.server.getWorldServer(entityplayer.dimension); // CraftBukkit - Update in case join event changed it
playerconnection.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch);
this.b(entityplayer, worldserver);
if (this.server.getResourcePack().length() > 0) {
@@ -139,6 +140,9 @@ public abstract class PlayerList {
entity.n = false;
}
}
+
+ // CraftBukkit - Moved from above, added world
+ c.info(entityplayer.getName() + "[" + s + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "] " + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")");
}
public void a(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) { // CraftBukkit - protected -> public