diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-11-28 06:21:35 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-11-28 06:21:35 +0000 |
commit | 91b673e375ee08791b15f5d9c153c28fa6c718eb (patch) | |
tree | 33302b81e5a9fb287caea5b249b06ff457d8044a /src/main/java | |
parent | aa90f2ff9cd645d1c5c2c6951845e39f38307053 (diff) | |
download | craftbukkit-91b673e375ee08791b15f5d9c153c28fa6c718eb.tar craftbukkit-91b673e375ee08791b15f5d9c153c28fa6c718eb.tar.gz craftbukkit-91b673e375ee08791b15f5d9c153c28fa6c718eb.tar.lz craftbukkit-91b673e375ee08791b15f5d9c153c28fa6c718eb.tar.xz craftbukkit-91b673e375ee08791b15f5d9c153c28fa6c718eb.zip |
Ignore empty messages (not just null) for join and quit
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/minecraft/server/NetServerHandler.java | 2 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/ServerConfigurationManager.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 81b541bb..2d7abfaa 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -648,7 +648,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener { a.info(this.player.name + " lost connection: " + s); // CraftBukkit start - we need to handle custom quit messages String quitMessage = this.minecraftServer.serverConfigurationManager.disconnect(this.player); - if (quitMessage != null) { + if ((quitMessage != null) && (quitMessage.length() > 0)) { this.minecraftServer.serverConfigurationManager.sendAll(new Packet3Chat(quitMessage)); } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java index 51a8b763..f5beefb7 100644 --- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java +++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java @@ -130,7 +130,7 @@ public class ServerConfigurationManager { String joinMessage = playerJoinEvent.getJoinMessage(); - if (joinMessage != null) { + if ((joinMessage != null) && (joinMessage.length() > 0)) { this.server.serverConfigurationManager.sendAll(new Packet3Chat(joinMessage)); } // CraftBukkit end |