mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 19:25:13 +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");
|
getMySQLColumnRealName = configFile.getString("DataSource.mySQLRealName", "realname");
|
||||||
getNonActivatedGroup = configFile.getInt("ExternalBoardOptions.nonActivedUserGroup", -1);
|
getNonActivatedGroup = configFile.getInt("ExternalBoardOptions.nonActivedUserGroup", -1);
|
||||||
unRegisteredGroup = configFile.getString("GroupOptions.UnregisteredPlayerGroup", "");
|
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", "");
|
getRegisteredGroup = configFile.getString("GroupOptions.RegisteredPlayerGroup", "");
|
||||||
getEnablePasswordVerifier = configFile.getBoolean("settings.restrictions.enablePasswordVerifier", true);
|
getEnablePasswordVerifier = configFile.getBoolean("settings.restrictions.enablePasswordVerifier", true);
|
||||||
|
|
||||||
@ -689,7 +694,7 @@ public final class Settings extends YamlConfiguration {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves current configuration (plus defaults) to disk.
|
* Saves current configuration (plus defaults) to disk.
|
||||||
* <p/>
|
* <p>
|
||||||
* If defaults and configuration are empty, saves blank file.
|
* If defaults and configuration are empty, saves blank file.
|
||||||
*
|
*
|
||||||
* @return True if saved successfully
|
* @return True if saved successfully
|
||||||
|
@ -156,8 +156,9 @@ public final class Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isUnrestricted(Player player) {
|
public static boolean isUnrestricted(Player player) {
|
||||||
return Settings.isAllowRestrictedIp && !Settings.getUnrestrictedName.isEmpty()
|
return Settings.isAllowRestrictedIp
|
||||||
&& (Settings.getUnrestrictedName.contains(player.getName()));
|
&& !Settings.getUnrestrictedName.isEmpty()
|
||||||
|
&& (Settings.getUnrestrictedName.contains(player.getName().toLowerCase()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user