Remove duplicate column initialization code, add datasource integration tests
- Drop initialization of all columns on table create in favor of checking each column individually. This is slower but guarantees that each column is only defined once in the code. Columns are only created once so having clean code outweighs performance. - Write more datasource integration tests
This commit is contained in:
@@ -18,20 +18,16 @@ public final class Settings {
|
||||
public static List<String> getUnrestrictedName;
|
||||
public static boolean isPermissionCheckEnabled;
|
||||
public static boolean isTeleportToSpawnEnabled;
|
||||
public static boolean isSessionsEnabled;
|
||||
public static boolean isAllowRestrictedIp;
|
||||
public static boolean isSaveQuitLocationEnabled;
|
||||
public static boolean protectInventoryBeforeLogInEnabled;
|
||||
public static boolean isStopEnabled;
|
||||
public static boolean reloadSupport;
|
||||
public static boolean noTeleport;
|
||||
public static boolean isRemoveSpeedEnabled;
|
||||
public static String getUnloggedinGroup;
|
||||
public static String unRegisteredGroup;
|
||||
public static String getRegisteredGroup;
|
||||
public static String defaultWorld;
|
||||
public static String crazyloginFileName;
|
||||
public static int getSessionTimeout;
|
||||
public static int getNonActivatedGroup;
|
||||
private static FileConfiguration configFile;
|
||||
|
||||
@@ -48,10 +44,7 @@ public final class Settings {
|
||||
private static void loadVariables() {
|
||||
isPermissionCheckEnabled = load(PluginSettings.ENABLE_PERMISSION_CHECK);
|
||||
isTeleportToSpawnEnabled = load(RestrictionSettings.TELEPORT_UNAUTHED_TO_SPAWN);
|
||||
isSessionsEnabled = load(PluginSettings.SESSIONS_ENABLED);
|
||||
getSessionTimeout = configFile.getInt("settings.sessions.timeout", 10);
|
||||
isAllowRestrictedIp = load(RestrictionSettings.ENABLE_RESTRICTED_USERS);
|
||||
isRemoveSpeedEnabled = load(RestrictionSettings.REMOVE_SPEED);
|
||||
isSaveQuitLocationEnabled = load(RestrictionSettings.SAVE_QUIT_LOCATION);
|
||||
getUnloggedinGroup = load(SecuritySettings.UNLOGGEDIN_GROUP);
|
||||
getNonActivatedGroup = configFile.getInt("ExternalBoardOptions.nonActivedUserGroup", -1);
|
||||
@@ -63,7 +56,6 @@ public final class Settings {
|
||||
reloadSupport = configFile.getBoolean("Security.ReloadCommand.useReloadCommandSupport", true);
|
||||
defaultWorld = configFile.getString("Purge.defaultWorld", "world");
|
||||
noTeleport = load(RestrictionSettings.NO_TELEPORT);
|
||||
crazyloginFileName = configFile.getString("Converter.CrazyLogin.fileName", "accounts.db");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user