mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2024-11-11 01:17:16 +00:00
Don't send the message if the length is 0
This commit is contained in:
parent
06f2f4e4b2
commit
b85e26321b
1 changed files with 3 additions and 2 deletions
|
@ -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,9 +83,10 @@ 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
|
||||
public void onQuit(PlayerQuitEvent event) {
|
||||
|
|
Loading…
Reference in a new issue