mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Strip nickname prefix when doing displayname comparison.
This commit is contained in:
parent
f53240191f
commit
cf9d79d24c
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue