1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-07 23:27:08 +02:00

Still give 'nickNoMore' message when removing a nickname.

This commit is contained in:
KHobbits
2014-07-12 16:48:01 +01:00
parent 8311da2653
commit 093a1f677b

View File

@@ -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;
}