本文整理汇总了Java中com.enderio.core.common.event.ConfigFileChangedEvent类的典型用法代码示例。如果您正苦于以下问题:Java ConfigFileChangedEvent类的具体用法?Java ConfigFileChangedEvent怎么用?Java ConfigFileChangedEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ConfigFileChangedEvent类属于com.enderio.core.common.event包,在下文中一共展示了ConfigFileChangedEvent类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processCommand
import com.enderio.core.common.event.ConfigFileChangedEvent; //导入依赖的package包/类
@Override
public void processCommand(ICommandSender player, String[] args) {
if (side == Side.CLIENT == player.getEntityWorld().isRemote)
for (String s : args) {
boolean validModid = false;
for (ModContainer mod : Loader.instance().getModObjectList().keySet()) {
if (mod.getModId().equals(s)) {
validModid = true;
}
}
if (validModid) {
ConfigFileChangedEvent event = new ConfigFileChangedEvent(s);
FMLCommonHandler.instance().bus().post(event);
if (event.isSuccessful()) {
sendResult(player, s, "success");
} else {
sendResult(player, s, "fail");
}
} else {
sendResult(player, s, "invalid");
}
}
}
示例2: onConfigFileChanged
import com.enderio.core.common.event.ConfigFileChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onConfigFileChanged(ConfigFileChangedEvent event) {
if (event.modID.equals(modid)) {
EnderCore.logger.info("Reloading ingame configs for modid: " + modid);
loadConfigFile();
reloadIngameConfigs();
event.setSuccessful();
saveConfigFile();
}
}
示例3: onConfigFileChanged
import com.enderio.core.common.event.ConfigFileChangedEvent; //导入依赖的package包/类
@SuppressWarnings("static-method")
@SubscribeEvent
public void onConfigFileChanged(ConfigFileChangedEvent event) {
if (event.modID.equals(EnderIOAddons.MODID)) {
Log.info("Updating config...");
syncConfig(true);
event.setSuccessful();
}
}
示例4: onConfigFileChanged
import com.enderio.core.common.event.ConfigFileChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public static void onConfigFileChanged(ConfigFileChangedEvent event) {
if (event.getModID().equals(EnderIOMachines.MODID)) {
Log.info("Updating config...");
syncConfig(true);
event.setSuccessful();
init((FMLInitializationEvent) null);
init((FMLPostInitializationEvent) null);
// TODO: if this is a server we should re-send the config sync packet to all connected players
}
}
示例5: onConfigFileChanged
import com.enderio.core.common.event.ConfigFileChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public static void onConfigFileChanged(ConfigFileChangedEvent event) {
if (event.getModID().equals(EnderIOPowerTools.MODID)) {
Log.info("Updating config...");
syncConfig(true);
event.setSuccessful();
init((FMLInitializationEvent) null);
init((FMLPostInitializationEvent) null);
// TODO: if this is a server we should re-send the config sync packet to all connected players
}
}
示例6: onConfigFileChanged
import com.enderio.core.common.event.ConfigFileChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public static void onConfigFileChanged(ConfigFileChangedEvent event) {
if (event.getModID().equals(EnderIOConduits.MODID)) {
Log.info("Updating config...");
syncConfig(true);
event.setSuccessful();
init((FMLInitializationEvent) null);
init((FMLPostInitializationEvent) null);
// TODO: if this is a server we should re-send the config sync packet to all connected players
}
}
示例7: onConfigFileChanged
import com.enderio.core.common.event.ConfigFileChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onConfigFileChanged(ConfigFileChangedEvent event) {
if (event.getModID().equals(EnderIO.MODID)) {
Log.info("Updating config...");
syncConfig(true);
event.setSuccessful();
init((FMLInitializationEvent) null);
init((FMLPostInitializationEvent) null);
}
}
示例8: onConfigFileChanged
import com.enderio.core.common.event.ConfigFileChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onConfigFileChanged(ConfigFileChangedEvent event) {
if (event.modID.equals(modid)) {
process(true);
}
}