optimization

This commit is contained in:
NK 2023-02-21 15:03:52 +00:00
parent f70974f0c3
commit 7e3b3c9c2a
2 changed files with 6 additions and 4 deletions

View file

@ -34,12 +34,11 @@ public class Lilase {
public void init(FMLInitializationEvent event) {
MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS.register(new KeyBindingManager());
MinecraftForge.EVENT_BUS.register(new EventManager());
MinecraftForge.EVENT_BUS.register(new me.night0721.lilase.managers.EventManager());
EventManager.INSTANCE.register(this);
ConfigUtils.register();
auctionHouse = new AuctionHouse();
KeyBindingManager.registerKeyBindings();
ConfigUtils.init();
ConfigUtils.reloadConfig();
}
@Subscribe

View file

@ -8,7 +8,10 @@ import java.io.File;
public class ConfigUtils {
public static Configuration config;
public final static String file = "config/Lilase.cfg";
public static void register() {
init();
reloadConfig();
}
public static void reloadConfig() {
if (!hasKey("main", "APIKey")) writeStringConfig("main", "APIKey", "");
if (!hasKey("main", "Webhook")) writeStringConfig("main", "Webhook", "");