diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-10-16 20:54:23 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-10-16 20:54:23 +0100 |
commit | d6dfe5da65fdc9bda682615488f5dc9917c394b5 (patch) | |
tree | d4fb346452d5ac4b9168292f0d8d4e8afd0ed2da | |
parent | 4583e549ea0aba7583ff43e17a830c65563ace5f (diff) | |
download | Essentials-d6dfe5da65fdc9bda682615488f5dc9917c394b5.tar Essentials-d6dfe5da65fdc9bda682615488f5dc9917c394b5.tar.gz Essentials-d6dfe5da65fdc9bda682615488f5dc9917c394b5.tar.lz Essentials-d6dfe5da65fdc9bda682615488f5dc9917c394b5.tar.xz Essentials-d6dfe5da65fdc9bda682615488f5dc9917c394b5.zip |
Strip nickname prefix when doing displayname comparison.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandnick.java | 3 |
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; |