New command system improvements, broadcast toggles, config fixes #62
1 changed files with 4 additions and 1 deletions
|
@ -56,7 +56,10 @@ public class ConfigData<T> { //TODO: Save after a while
|
|||
val = primitiveDef;
|
||||
}
|
||||
if (!saved && Objects.equals(val, primitiveDef)) { //String needs .equals()
|
||||
set(def); //Save default value - def is always set
|
||||
if (def == null && config != null) //In Discord's case def may be null
|
||||
config.set(path, primitiveDef);
|
||||
else
|
||||
set(def); //Save default value - def is always set
|
||||
saved = true;
|
||||
}
|
||||
if (getter != null) {
|
||||
|
|
Loading…
Reference in a new issue