Java 类net.minecraftforge.fml.common.event.FMLModDisabledEvent 实例源码

项目:CustomWorldGen    文件:LoadController.java   
void disableMod(ModContainer mod)
{
    HashMap<String, EventBus> temporary = Maps.newHashMap(eventChannels);
    String modId = mod.getModId();
    EventBus bus = temporary.remove(modId);
    bus.post(new FMLModDisabledEvent());
    if (errors.get(modId).isEmpty())
    {
        eventChannels = ImmutableMap.copyOf(temporary);
        modStates.put(modId, ModState.DISABLED);
        modObjectList.remove(mod);
        activeModList.remove(mod);
    }
}
项目:ZebrasToggleSneak    文件:ZebrasToggleSneak.java   
@EventHandler
public void deactivate(FMLModDisabledEvent event) {
    // this class instance is already unregistered from the event bus by Forge itself
    if (displayStatus() > 0) MinecraftForge.EVENT_BUS.unregister(guiDrawer);        
    if (mc.thePlayer != null)
        mc.thePlayer.movementInput = new MovementInputFromOptions(mc.gameSettings);
}
项目:HoloInventory    文件:HoloInventory.java   
@Mod.EventHandler
public void disableEvent(FMLModDisabledEvent event)
{
    logger.info("Mod disabled via Mods list.");
}