summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2014-07-12 16:48:01 +0100
committerKHobbits <rob@khobbits.co.uk>2014-07-12 16:48:01 +0100
commit6f03022bf0b94a368de5281ccfa6f20d0d4e4427 (patch)
treed5cd50fe843a899cfa2e15a1ec48e8ee2d022581
parentc3fe51647bdbfe03ae527320e094d5f7f9dd433b (diff)
downloadEssentials-6f03022bf0b94a368de5281ccfa6f20d0d4e4427.tar
Essentials-6f03022bf0b94a368de5281ccfa6f20d0d4e4427.tar.gz
Essentials-6f03022bf0b94a368de5281ccfa6f20d0d4e4427.tar.lz
Essentials-6f03022bf0b94a368de5281ccfa6f20d0d4e4427.tar.xz
Essentials-6f03022bf0b94a368de5281ccfa6f20d0d4e4427.zip
Still give 'nickNoMore' message when removing a nickname.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandnick.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnick.java b/Essentials/src/com/earth2me/essentials/commands/Commandnick.java
index e9e258085..366b525e0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandnick.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandnick.java
@@ -64,7 +64,12 @@ public class Commandnick extends EssentialsLoopCommand
final String nick = args[0];
if (target.getName().equalsIgnoreCase(nick))
{
+ String oldName = target.getDisplayName();
setNickname(server, sender, target, nick);
+ if (!target.getDisplayName().equalsIgnoreCase(oldName))
+ {
+ target.sendMessage(tl("nickNoMore"));
+ }
target.sendMessage(tl("nickSet", target.getDisplayName()));
}
else if ("off".equalsIgnoreCase(nick))
@@ -117,8 +122,9 @@ public class Commandnick extends EssentialsLoopCommand
return true;
}
}
- if (ess.getUser(lowerNick) != null && ess.getUser(lowerNick) != target) {
- return true;
+ if (ess.getUser(lowerNick) != null && ess.getUser(lowerNick) != target)
+ {
+ return true;
}
return false;
}