mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-10-25 06:51:19 +00:00
Less strict matching on /realname
This commit is contained in:
parent
5611acf12c
commit
59086932bd
|
@ -34,15 +34,12 @@ public class Commandrealname extends EssentialsCommand
|
|||
}
|
||||
u.setDisplayNick();
|
||||
final String displayName = Util.stripFormat(u.getDisplayName()).toLowerCase(Locale.ENGLISH);
|
||||
if (!whois.equals(displayName)
|
||||
&& !displayName.equals(Util.stripFormat(ess.getSettings().getNicknamePrefix()) + whois)
|
||||
&& !whois.equalsIgnoreCase(u.getName()))
|
||||
if (displayName.contains(whois))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
foundUser = true;
|
||||
sender.sendMessage(u.getDisplayName() + " " + _("is") + " " + u.getName());
|
||||
}
|
||||
}
|
||||
if (!foundUser)
|
||||
{
|
||||
throw new NoSuchFieldException(_("playerNotFound"));
|
||||
|
|
Loading…
Reference in a new issue