From b85e26321b8b1f3e8c34ac9a101ac2456938268e Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 26 Jan 2014 13:23:53 +1300 Subject: [PATCH] Don't send the message if the length is 0 --- src/me/libraryaddict/disguise/DisguiseListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/me/libraryaddict/disguise/DisguiseListener.java b/src/me/libraryaddict/disguise/DisguiseListener.java index 5a2827ca..7001f9cb 100644 --- a/src/me/libraryaddict/disguise/DisguiseListener.java +++ b/src/me/libraryaddict/disguise/DisguiseListener.java @@ -71,7 +71,7 @@ public class DisguiseListener implements Listener { if (disguises.length > 0) { DisguiseAPI.undisguiseToAll(event.getEntity()); for (Disguise disguise : disguises) { - if (DisguiseUtilities.isDisguiseInUse(disguise)) { + if (DisguiseUtilities.isDisguiseInUse(disguise) && DisguiseConfig.getDisguiseBlownMessage().length() > 0) { ((Player) event.getEntity()).sendMessage(DisguiseConfig.getDisguiseBlownMessage()); break; } @@ -83,8 +83,9 @@ public class DisguiseListener implements Listener { @EventHandler public void onJoin(PlayerJoinEvent event) { Player p = event.getPlayer(); - if (latestVersion != null && p.hasPermission(updateNotifyPermission)) + if (latestVersion != null && p.hasPermission(updateNotifyPermission)) { p.sendMessage(String.format(updateMessage, currentVersion, latestVersion)); + } } @EventHandler