A small fix can go a long way

This commit is contained in:
Norbi Peti 2020-08-31 23:53:29 +02:00
parent 784ad5e1c7
commit cedeca2f61
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56

View file

@ -241,7 +241,9 @@ public class ConfigData<T> {
* @return A ReadOnlyConfigData instance. * @return A ReadOnlyConfigData instance.
*/ */
public ReadOnlyConfigData<T> buildReadOnly() { public ReadOnlyConfigData<T> buildReadOnly() {
return new ReadOnlyConfigData<>(config, path, def, primitiveDef, getter, setter); ReadOnlyConfigData<T> config = new ReadOnlyConfigData<>(this.config, path, def, primitiveDef, getter, setter);
this.config.onConfigBuild(config);
return config;
} }
public String toString() {return "ConfigData.ConfigDataBuilder(config=" + this.config + ", path=" + this.path + ", def=" + this.def + ", primitiveDef=" + this.primitiveDef + ", getter=" + this.getter + ", setter=" + this.setter + ")";} public String toString() {return "ConfigData.ConfigDataBuilder(config=" + this.config + ", path=" + this.path + ", def=" + this.def + ", primitiveDef=" + this.primitiveDef + ", getter=" + this.getter + ", setter=" + this.setter + ")";}