Don't let unrestricted usernames bypass the locked ip-username check

This commit is contained in:
Gabriele C 2022-07-17 18:40:11 +02:00
parent 64c45c43df
commit a67a4bb72b
1 changed files with 5 additions and 5 deletions

View File

@ -93,6 +93,11 @@ public class AsynchronousJoin implements AsynchronousProcess {
final String name = player.getName().toLowerCase();
final String ip = PlayerUtils.getPlayerIp(player);
if (!validationService.fulfillsNameRestrictions(player)) {
handlePlayerWithUnmetNameRestriction(player, ip);
return;
}
if (service.getProperty(RestrictionSettings.UNRESTRICTED_NAMES).contains(name)) {
return;
}
@ -107,11 +112,6 @@ public class AsynchronousJoin implements AsynchronousProcess {
pluginHookService.setEssentialsSocialSpyStatus(player, false);
}
if (!validationService.fulfillsNameRestrictions(player)) {
handlePlayerWithUnmetNameRestriction(player, ip);
return;
}
if (!validatePlayerCountForIp(player, ip)) {
return;
}