Settings file was not being initialized

This commit is contained in:
zontreck 2024-04-23 22:24:41 -07:00
parent 378f44b769
commit fe383b2973
3 changed files with 5 additions and 1 deletions

View file

@ -53,7 +53,7 @@ mod_name=Zontreck's Library Mod
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=GPLv3 mod_license=GPLv3
# The mod version. See https://semver.org/ # The mod version. See https://semver.org/
mod_version=1201.13.042324.2158 mod_version=1201.13.042324.2223
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources. # This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html # See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View file

@ -86,6 +86,8 @@ public class LibZontreck {
// Register the setup method for modloading // Register the setup method for modloading
bus.addListener(this::setup); bus.addListener(this::setup);
ServerConfig.init();
MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS.register(new ForgeEventHandlers()); MinecraftForge.EVENT_BUS.register(new ForgeEventHandlers());

View file

@ -22,6 +22,8 @@ public class ServerConfig
database = DatabaseSection.deserialize(config.getCompound(DatabaseSection.TAG_NAME)); database = DatabaseSection.deserialize(config.getCompound(DatabaseSection.TAG_NAME));
} else { } else {
database = new DatabaseSection(); database = new DatabaseSection();
commit();
} }
} }