Code cleanup

This commit is contained in:
Rammelkast committed 2020-03-31 13:15:59 +02:00
1 parent 6afe0049c5
commit f88c31051b
13 files changed
+28 -36

No files matched your search

@@ -57,10 +57,13 @@ public class Configuration {
// Now load others
enterprise = new Enterprise(plugin, this);
flatfiles = new ArrayList<ConfigurationFile>() {{
add(config);
add(enterprise);
}};
flatfiles = new ArrayList<ConfigurationFile>() {
private static final long serialVersionUID = 4497798966909062852L;
{
add(config);
add(enterprise);
}
};
dbfiles = new ArrayList<ConfigurationTable>();
@@ -170,7 +170,8 @@ public class ConfigurationFile {
return path;
}
public T getValue() {
@SuppressWarnings("unchecked")
public T getValue() {
return (T) value;
}
@@ -180,7 +181,8 @@ public class ConfigurationFile {
return value;
}
public T getDefaultValue() {
@SuppressWarnings("unchecked")
public T getDefaultValue() {
return (T) getDefaultConfigFile().get(path);
}
@@ -104,6 +104,7 @@ public class ConfigurationTable {
return false;
}
@SuppressWarnings("deprecation")
public void convertToUUID(String colName) {
String sqlSelect = "SELECT " + colName + " FROM " + getFullTable();
String sqlUpdate = "UPDATE " + getFullTable() + " SET " + colName + " = ? WHERE " + colName + " = ?";
@@ -74,6 +74,6 @@ public class YamlLevelsHolder extends ConfigurationFile implements Levels {
}
private void saveLevel(UUID uuid, int level) {
new ConfigValue<Integer>(uuid.toString(), false).setValue(new Integer(level));
new ConfigValue<Integer>(uuid.toString(), false).setValue(level);
}
}