Don't send kick message if the message is empty. Fixes BUKKIT-1789

This commit is contained in:
Jake King 2012-06-12 23:44:02 -07:00 committed by Travis Watkins
parent 01fe76733f
commit f58e514192

View File

@ -150,7 +150,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
// CraftBukkit start // CraftBukkit start
leaveMessage = event.getLeaveMessage(); leaveMessage = event.getLeaveMessage();
if (leaveMessage != null) { if (leaveMessage != null && leaveMessage.length() > 0) {
this.minecraftServer.serverConfigurationManager.sendAll(new Packet3Chat(leaveMessage)); this.minecraftServer.serverConfigurationManager.sendAll(new Packet3Chat(leaveMessage));
} }
getPlayer().disconnect(s); getPlayer().disconnect(s);