mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 21:19:00 +01:00
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.
This commit is contained in:
parent
f726d07f11
commit
155b83e2c7
@ -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]);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user