mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-12 09:35:26 +02:00
Strip nickname prefix when doing displayname comparison.
This commit is contained in:
@@ -110,7 +110,8 @@ public class Commandnick extends EssentialsLoopCommand
|
|||||||
{
|
{
|
||||||
continue;
|
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)))
|
|| lowerNick.equals(onlinePlayer.getName().toLowerCase(Locale.ENGLISH)))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user