3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 21:10:17 +01:00

Fixed PlayerQuitEvent.setMessage().

Dieser Commit ist enthalten in:
EvilSeph 2011-04-25 22:36:55 -04:00
Ursprung fe75ab2500
Commit 6711975658

Datei anzeigen

@ -570,8 +570,12 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
if (this.disconnected) return; // CraftBukkit -- rarely it would send a disconnect line twice
a.info(this.player.name + " lost connection: " + s);
this.minecraftServer.serverConfigurationManager.sendAll(new Packet3Chat("\u00A7e" + this.player.name + " left the game."));
this.minecraftServer.serverConfigurationManager.disconnect(this.player);
// CraftBukkit start - we need to handle custom quit messages
String quitMessage = this.minecraftServer.serverConfigurationManager.disconnect(this.player);
if (quitMessage != null) {
this.minecraftServer.serverConfigurationManager.sendAll(new Packet3Chat(quitMessage));
}
// CraftBukkit end
this.disconnected = true;
}