diff options
author | feildmaster <admin@feildmaster.com> | 2012-12-24 22:11:04 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-12-24 22:11:04 -0600 |
commit | 155b83e2c7b3ee2bdf057353edd8e24247fd14ff (patch) | |
tree | e48ed92744c10c7245e4564f371b68b6c239a59d /src/main/java/net/minecraft/server | |
parent | f726d07f1150e5cf6665ec40bccb2b2e2d265251 (diff) | |
download | craftbukkit-155b83e2c7b3ee2bdf057353edd8e24247fd14ff.tar craftbukkit-155b83e2c7b3ee2bdf057353edd8e24247fd14ff.tar.gz craftbukkit-155b83e2c7b3ee2bdf057353edd8e24247fd14ff.tar.lz craftbukkit-155b83e2c7b3ee2bdf057353edd8e24247fd14ff.tar.xz craftbukkit-155b83e2c7b3ee2bdf057353edd8e24247fd14ff.zip |
Perform permission removals after the quit event. Fixes BUKKIT-3303
The player would have no permissions (other than their OP status)
when checked in the Quit event. This is because we removed permissions
before the event occurred. By calling it afterwards, we can persist
the data until the server finally removes the player.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/PlayerConnection.java | 4 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/PlayerList.java | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index fb6a54b2..dd29094f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -163,7 +163,6 @@ public class PlayerConnection extends Connection { if (leaveMessage != null && leaveMessage.length() > 0) { this.minecraftServer.getPlayerList().sendAll(new Packet3Chat(leaveMessage)); } - getPlayer().disconnect(s); // CraftBukkit end this.minecraftServer.getPlayerList().disconnect(this.player); @@ -1068,9 +1067,6 @@ public class PlayerConnection extends Connection { } public void a(Packet255KickDisconnect packet255kickdisconnect) { - // CraftBukkit start - getPlayer().disconnect("disconnect.quitting"); - // CraftBukkit end this.networkManager.a("disconnect.quitting", new Object[0]); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java index 52dd997b..c43a6edd 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -204,6 +204,7 @@ public abstract class PlayerList { // CraftBukkit start - quitting must be before we do final save of data, in case plugins need to modify it PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(this.cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.name + " left the game."); this.cserver.getPluginManager().callEvent(playerQuitEvent); + entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); // CraftBukkit end this.b(entityplayer); |