summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-10-16 20:54:23 +0100
committerKHobbits <rob@khobbits.co.uk>2013-10-16 20:54:23 +0100
commitcf9d79d24c8b33d10585a3fc97bc38554dee6d8b (patch)
treedbee2c4fdb08c9a35c7c86616db989fcda211c4d
parentf53240191fef2d4534b80eae926c37f1867bb3f1 (diff)
downloadEssentials-cf9d79d24c8b33d10585a3fc97bc38554dee6d8b.tar
Essentials-cf9d79d24c8b33d10585a3fc97bc38554dee6d8b.tar.gz
Essentials-cf9d79d24c8b33d10585a3fc97bc38554dee6d8b.tar.lz
Essentials-cf9d79d24c8b33d10585a3fc97bc38554dee6d8b.tar.xz
Essentials-cf9d79d24c8b33d10585a3fc97bc38554dee6d8b.zip
Strip nickname prefix when doing displayname comparison.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandnick.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnick.java b/Essentials/src/com/earth2me/essentials/commands/Commandnick.java
index 2bdaddc88..d6346e71c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandnick.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandnick.java
@@ -110,7 +110,8 @@ public class Commandnick extends EssentialsLoopCommand
{
continue;
}
- if (lowerNick.equals(FormatUtil.stripFormat(onlinePlayer.getDisplayName().toLowerCase(Locale.ENGLISH)))
+ final String matchNick = FormatUtil.stripFormat(onlinePlayer.getDisplayName().replace(ess.getSettings().getNicknamePrefix(), ""));
+ if (lowerNick.equals(matchNick.toLowerCase(Locale.ENGLISH))
|| lowerNick.equals(onlinePlayer.getName().toLowerCase(Locale.ENGLISH)))
{
return true;