Archiviert
13
0

Ignore empty messages (not just null) for join and quit

Dieser Commit ist enthalten in:
Nathan Adams 2011-11-28 06:21:35 +00:00
Ursprung aa90f2ff9c
Commit 91b673e375
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -648,7 +648,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
a.info(this.player.name + " lost connection: " + s); a.info(this.player.name + " lost connection: " + s);
// CraftBukkit start - we need to handle custom quit messages // CraftBukkit start - we need to handle custom quit messages
String quitMessage = this.minecraftServer.serverConfigurationManager.disconnect(this.player); String quitMessage = this.minecraftServer.serverConfigurationManager.disconnect(this.player);
if (quitMessage != null) { if ((quitMessage != null) && (quitMessage.length() > 0)) {
this.minecraftServer.serverConfigurationManager.sendAll(new Packet3Chat(quitMessage)); this.minecraftServer.serverConfigurationManager.sendAll(new Packet3Chat(quitMessage));
} }
// CraftBukkit end // CraftBukkit end

Datei anzeigen

@ -130,7 +130,7 @@ public class ServerConfigurationManager {
String joinMessage = playerJoinEvent.getJoinMessage(); String joinMessage = playerJoinEvent.getJoinMessage();
if (joinMessage != null) { if ((joinMessage != null) && (joinMessage.length() > 0)) {
this.server.serverConfigurationManager.sendAll(new Packet3Chat(joinMessage)); this.server.serverConfigurationManager.sendAll(new Packet3Chat(joinMessage));
} }
// CraftBukkit end // CraftBukkit end