Temporarily hardcoded ranks since the getStringList was not loading it from the config and just emptying it instead
This commit is contained in:
parent
75aa05cdf5
commit
95030d8163
|
|
@ -148,9 +148,28 @@ abstract class AbstractConfig {
|
|||
return config.node(splitPath(path)).getLong(def);
|
||||
}
|
||||
|
||||
protected static <T> List<String> getList(String prefix, String path, T def) {
|
||||
private static void setStringList(String prefix, String path, List<String> def) {
|
||||
path = prefix + path;
|
||||
System.out.println("Setting: " + def);
|
||||
if(config.node(splitPath(path)).virtual()) {
|
||||
try {
|
||||
config.node(splitPath(path)).setList(TypeToken.get(String.class), def);
|
||||
} catch (SerializationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
config.node(splitPath(path)).setList(TypeToken.get(String.class), def);
|
||||
} catch (SerializationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
saveConfig();
|
||||
}
|
||||
|
||||
protected static List<String> getStringList(String prefix, String path, List<String> def) {
|
||||
try {
|
||||
set(prefix, path, def);
|
||||
setStringList(prefix, path, def);
|
||||
return config.node(splitPath(path)).getList(TypeToken.get(String.class));
|
||||
} catch(SerializationException ex) {
|
||||
ex.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public final class Config extends AbstractConfig {
|
|||
UPDATE_FREQUENCY_MINUTES = config.getInt(prefix, "update-frequency-minutes", UPDATE_FREQUENCY_MINUTES);
|
||||
BOOST_ANNOUNCE_CHANNEL = config.getLong(prefix, "boost-announce-channel", BOOST_ANNOUNCE_CHANNEL);
|
||||
PLUGIN_MESSAGE_CHANNEL = config.getString(prefix, "plugin-message-channel", PLUGIN_MESSAGE_CHANNEL);
|
||||
DONOR_RANKS = config.getList(prefix, "donor-ranks", DONOR_RANKS);
|
||||
// DONOR_RANKS = config.getStringList(prefix, "donor-ranks", DONOR_RANKS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user