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
commit093a1f677b58f6736154ed78bb1c95af5e2fc440 (patch)
tree4d6d8ba79e538956502fc89eb8c9a39f6afb7ad7
parent8311da2653e164f224a90924aec8067895f7c385 (diff)
downloadEssentials-093a1f677b58f6736154ed78bb1c95af5e2fc440.tar
Essentials-093a1f677b58f6736154ed78bb1c95af5e2fc440.tar.gz
Essentials-093a1f677b58f6736154ed78bb1c95af5e2fc440.tar.lz
Essentials-093a1f677b58f6736154ed78bb1c95af5e2fc440.tar.xz
Essentials-093a1f677b58f6736154ed78bb1c95af5e2fc440.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;
}