summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorafforess <afforess@gmail.com>2011-04-03 13:02:35 -0400
committerEvilSeph <evilseph@unaligned.org>2011-04-03 16:11:16 -0400
commitd1e6408ea2a06e88cdfbadc585291812d179c52d (patch)
tree7de9be2e09846b5e97c37e246c29a794a9e2b3a1
parent0f3f3c552aed3eca287c7b6a2e4658c04c670855 (diff)
downloadcraftbukkit-d1e6408ea2a06e88cdfbadc585291812d179c52d.tar
craftbukkit-d1e6408ea2a06e88cdfbadc585291812d179c52d.tar.gz
craftbukkit-d1e6408ea2a06e88cdfbadc585291812d179c52d.tar.lz
craftbukkit-d1e6408ea2a06e88cdfbadc585291812d179c52d.tar.xz
craftbukkit-d1e6408ea2a06e88cdfbadc585291812d179c52d.zip
Changed PlayerQuit to allow last minute modifications to player state.
-rw-r--r--src/main/java/net/minecraft/server/ServerConfigurationManager.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
index b2a4e9a1..71a56c3f 100644
--- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java
+++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
@@ -112,16 +112,18 @@ public class ServerConfigurationManager {
}
public String c(EntityPlayer entityplayer) { // CraftBukkit - changed return type
- this.n.a(entityplayer);
- entityplayer.world.d(entityplayer); // CraftBukkit
- this.b.remove(entityplayer);
-
// CraftBukkit start
+ // Quitting must be before we do final save of data, in case plugins need to modify it
((WorldServer) entityplayer.world).manager.b(entityplayer);
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(server.getPlayer(entityplayer), "\u00A7e" + entityplayer.name + " left the game.");
server.getPluginManager().callEvent(playerQuitEvent);
- return playerQuitEvent.getQuitMessage();
// CraftBukkit end
+
+ this.n.a(entityplayer);
+ entityplayer.world.d(entityplayer); // CraftBukkit
+ this.b.remove(entityplayer);
+
+ return playerQuitEvent.getQuitMessage(); // CraftBukkit
}
public EntityPlayer a(NetLoginHandler netloginhandler, String s, String s1) {