My config file doesn't seem to be working, it shows up in game and I can change the settings and it works but for some reason it doesn't do anything.
Here is my code for the config:
@SuppressWarnings("WeakerAccess")
@Config(modid = MobsofTime.MODID)
@LangKey(MobsofTime.MODID + ".config.title")
public class Settings {
@Name("Time Manipulation")
@Comment("Whether or not items can manipulate server time")
public static boolean timeManipulation = true;
@Mod.EventBusSubscriber(modid = "mobsoftime")
private static class EventHandler {
/**
* Inject the new values and save to the config file when the config has been changed from the GUI.
*
* @param event The event
*/
@SubscribeEvent
public static void onConfigChanged(final ConfigChangedEvent.OnConfigChangedEvent event) {
if (event.getModID().equals("mobsoftime")) {
ConfigManager.sync("mobsoftime", Config.Type.INSTANCE);
}
}
}
}
And here is my code for something activated by the config:
if (Settings.timeManipulation = true) {
if ((entity.isSneaking())) {
TickrateAPI.changeServerTickrate(20F);
} else {
TickrateAPI.changeServerTickrate(960F);
}
} else {}