1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 01:25:26 +02:00

Strip nickname prefix when doing displayname comparison.

This commit is contained in:
KHobbits
2013-10-16 20:54:23 +01:00
parent 4583e549ea
commit d6dfe5da65

View File

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