From cf9d79d24c8b33d10585a3fc97bc38554dee6d8b Mon Sep 17 00:00:00 2001 From: KHobbits Date: Wed, 16 Oct 2013 20:54:23 +0100 Subject: [PATCH] Strip nickname prefix when doing displayname comparison. --- .../src/com/earth2me/essentials/commands/Commandnick.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;