Jump to content

Emeralaxy

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Emeralaxy

  1. 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 {}
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.