mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-09 20:21:02 +01:00
Setup unrestricted names into lowercase.
This commit is contained in:
parent
e387a801f7
commit
8a6ab3edb5
@ -184,7 +184,12 @@ public final class Settings extends YamlConfiguration {
|
||||
getMySQLColumnRealName = configFile.getString("DataSource.mySQLRealName", "realname");
|
||||
getNonActivatedGroup = configFile.getInt("ExternalBoardOptions.nonActivedUserGroup", -1);
|
||||
unRegisteredGroup = configFile.getString("GroupOptions.UnregisteredPlayerGroup", "");
|
||||
getUnrestrictedName = configFile.getStringList("settings.unrestrictions.UnrestrictedName");
|
||||
|
||||
getUnrestrictedName = new ArrayList<>();
|
||||
for (String name : configFile.getStringList("settings.unrestrictions.UnrestrictedName")) {
|
||||
getUnrestrictedName.add(name.toLowerCase());
|
||||
}
|
||||
|
||||
getRegisteredGroup = configFile.getString("GroupOptions.RegisteredPlayerGroup", "");
|
||||
getEnablePasswordVerifier = configFile.getBoolean("settings.restrictions.enablePasswordVerifier", true);
|
||||
|
||||
@ -689,7 +694,7 @@ public final class Settings extends YamlConfiguration {
|
||||
|
||||
/**
|
||||
* Saves current configuration (plus defaults) to disk.
|
||||
* <p/>
|
||||
* <p>
|
||||
* If defaults and configuration are empty, saves blank file.
|
||||
*
|
||||
* @return True if saved successfully
|
||||
|
@ -156,8 +156,9 @@ public final class Utils {
|
||||
}
|
||||
|
||||
public static boolean isUnrestricted(Player player) {
|
||||
return Settings.isAllowRestrictedIp && !Settings.getUnrestrictedName.isEmpty()
|
||||
&& (Settings.getUnrestrictedName.contains(player.getName()));
|
||||
return Settings.isAllowRestrictedIp
|
||||
&& !Settings.getUnrestrictedName.isEmpty()
|
||||
&& (Settings.getUnrestrictedName.contains(player.getName().toLowerCase()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user