mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 13:36:16 +01:00
Fixed PlayerQuitEvent.setMessage().
This commit is contained in:
parent
fe75ab2500
commit
6711975658
@ -570,8 +570,12 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
|||||||
if (this.disconnected) return; // CraftBukkit -- rarely it would send a disconnect line twice
|
if (this.disconnected) return; // CraftBukkit -- rarely it would send a disconnect line twice
|
||||||
|
|
||||||
a.info(this.player.name + " lost connection: " + s);
|
a.info(this.player.name + " lost connection: " + s);
|
||||||
this.minecraftServer.serverConfigurationManager.sendAll(new Packet3Chat("\u00A7e" + this.player.name + " left the game."));
|
// CraftBukkit start - we need to handle custom quit messages
|
||||||
this.minecraftServer.serverConfigurationManager.disconnect(this.player);
|
String quitMessage = this.minecraftServer.serverConfigurationManager.disconnect(this.player);
|
||||||
|
if (quitMessage != null) {
|
||||||
|
this.minecraftServer.serverConfigurationManager.sendAll(new Packet3Chat(quitMessage));
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
this.disconnected = true;
|
this.disconnected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user