Java Code Examples for net.minecraftforge.fml.client.event.ConfigChangedEvent#OnConfigChangedEvent

The following examples show how to use net.minecraftforge.fml.client.event.ConfigChangedEvent#OnConfigChangedEvent . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EmergingTechnologyConfig.java    From EmergingTechnology with MIT License 5 votes vote down vote up
/**
 * 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(EmergingTechnology.MODID)) {
		ConfigManager.sync(EmergingTechnology.MODID, Config.Type.INSTANCE);
	}
}
 
Example 2
Source File: ModProvider.java    From AgriCraft with MIT License 5 votes vote down vote up
@SubscribeEvent
public void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event) {
    if (event.getModID().equals(Reference.MOD_ID)) {
        AgriCore.getConfig().save();
        AgriCore.getConfig().load();
        AgriCore.getLogger("agricraft").debug("Configuration reloaded.");
    }
}
 
Example 3
Source File: I18nConfig.java    From I18nUpdateMod with MIT License 5 votes vote down vote up
@SubscribeEvent
public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
    if (event.getModID().equals(I18nUpdateMod.MODID)) {
        ConfigManager.sync(I18nUpdateMod.MODID, Config.Type.INSTANCE);
        I18nUpdateMod.logger.info("配置文件修改已经保存");
    }
}
 
Example 4
Source File: CraftingKeys.java    From CraftingKeys with MIT License 5 votes vote down vote up
/**
 * This method will be executed when the Config is changed. Update!
 *
 * @param eventArgs Input event from FML
 */
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
    if (eventArgs.getModID().equals(MODID)) { 
        Config.syncConfig();
        Logger.info("onConfigChanged(e)", "Changed config.");
    }
}
 
Example 5
Source File: CommonHandler.java    From GokiStats with MIT License 5 votes vote down vote up
@SubscribeEvent
public void configChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
    if (event.getModID().equals(Reference.MODID)) {
        ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE);
        LootConfigDeserializer.reloadAll();
    }
}
 
Example 6
Source File: CyberwareConfig.java    From Cyberware with MIT License 5 votes vote down vote up
@SubscribeEvent
public void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event)
{
	if (event.getModID().equalsIgnoreCase(Cyberware.MODID))
	{
		loadConfig();
	}
}
 
Example 7
Source File: SoundPhysicsCore.java    From Sound-Physics with GNU General Public License v3.0 4 votes vote down vote up
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs)
{
	if (eventArgs.getModID().equals(modid))
		syncConfig();
}
 
Example 8
Source File: ConfigurationHandler.java    From Moo-Fluids with GNU General Public License v3.0 4 votes vote down vote up
@SubscribeEvent
public static void onConfigurationChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
  if (event.getModID().equalsIgnoreCase(ModInformation.MOD_ID)) {
    updateConfiguration();
  }
}
 
Example 9
Source File: ConfigHandler.java    From VersionChecker with GNU Lesser General Public License v3.0 4 votes vote down vote up
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
    if(eventArgs.getModID().equals(Reference.MOD_ID))
        ConfigHandler.syncConfig();
}
 
Example 10
Source File: VSConfig.java    From Valkyrien-Skies with Apache License 2.0 4 votes vote down vote up
@SubscribeEvent
public static void onConfigChanged(final ConfigChangedEvent.OnConfigChangedEvent event) {
    if (event.getModID().equals(ValkyrienSkiesMod.MOD_ID)) {
        sync();
    }
}
 
Example 11
Source File: ToroQuestConfiguration.java    From ToroQuest with GNU General Public License v3.0 4 votes vote down vote up
@SubscribeEvent
public void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event) {
	if (event.getModID().equalsIgnoreCase(ToroQuest.MODID)) {
		loadConfiguration();
	}
}
 
Example 12
Source File: ConfigurationHandler.java    From ToroQuest with GNU General Public License v3.0 4 votes vote down vote up
@SubscribeEvent
public void onConfigChangeEvent(ConfigChangedEvent.OnConfigChangedEvent event) {
	if (event.getModID().equalsIgnoreCase(ToroQuest.MODID)) {
		loadConfiguration();
	}
}
 
Example 13
Source File: TofuConfig.java    From TofuCraftReload with MIT License 4 votes vote down vote up
@SubscribeEvent
public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
    if (event.getModID().equals(TofuMain.MODID)) {
        ConfigManager.sync(TofuMain.MODID, Config.Type.INSTANCE);
    }
}
 
Example 14
Source File: ConfigurationHandler.java    From LunatriusCore with MIT License 4 votes vote down vote up
@SubscribeEvent
public void onConfigurationChangedEvent(final ConfigChangedEvent.OnConfigChangedEvent event) {
    if (event.getModID().equalsIgnoreCase(Reference.MODID)) {
        ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE);
    }
}
 
Example 15
Source File: HoloInventory.java    From HoloInventory with MIT License 4 votes vote down vote up
@SubscribeEvent
public void updateConfig(ConfigChangedEvent.OnConfigChangedEvent event)
{
    if (event.getModID().equals(MODID)) updateConfig();
}
 
Example 16
Source File: CommonProxy.java    From YouTubeModdingTutorial with MIT License 4 votes vote down vote up
@SubscribeEvent
public void onConfigChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event) {
    if (event.getModID().equals(MODID)) {
        ConfigManager.sync(MODID, Config.Type.INSTANCE);
    }
}
 
Example 17
Source File: GTMod.java    From GT-Classic with GNU Lesser General Public License v3.0 4 votes vote down vote up
@SubscribeEvent
public void onConfigChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event) {
	if (event.getModID().equals(MODID)) {
		ConfigManager.sync(MODID, Config.Type.INSTANCE);
	}
}
 
Example 18
Source File: CommonProxy.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
@SubscribeEvent
public static void syncConfigValues(ConfigChangedEvent.OnConfigChangedEvent event) {
    if (event.getModID().equals(GTValues.MODID)) {
        ConfigManager.sync(GTValues.MODID, Type.INSTANCE);
    }
}
 
Example 19
Source File: EventHandlers.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
@SubscribeEvent
public void onConfigChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event) {
    if (event.getModID().equals(GTValues.MODID)) {
        ConfigManager.sync(GTValues.MODID, Config.Type.INSTANCE);
    }
}
 
Example 20
Source File: SakuraConfig.java    From Sakura_mod with MIT License 4 votes vote down vote up
@SubscribeEvent
public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
    if (event.getModID().equals(SakuraMain.MODID)) {
        ConfigManager.sync(SakuraMain.MODID, Config.Type.INSTANCE);
    }
}