Search in sources :

Example 1 with UnloadWorldEvent

use of org.spongepowered.api.event.world.UnloadWorldEvent in project SpongeForge by SpongePowered.

the class SpongeForgeEventFactory method callWorldUnloadEvent.

private static UnloadWorldEvent callWorldUnloadEvent(Event event) {
    UnloadWorldEvent spongeEvent = (UnloadWorldEvent) event;
    ((IMixinEventBus) MinecraftForge.EVENT_BUS).post(new WorldEvent.Unload((net.minecraft.world.World) spongeEvent.getTargetWorld()), true);
    return spongeEvent;
}
Also used : IMixinEventBus(org.spongepowered.mod.interfaces.IMixinEventBus) LoadWorldEvent(org.spongepowered.api.event.world.LoadWorldEvent) EntityJoinWorldEvent(net.minecraftforge.event.entity.EntityJoinWorldEvent) UnloadWorldEvent(org.spongepowered.api.event.world.UnloadWorldEvent) WorldEvent(net.minecraftforge.event.world.WorldEvent) SaveWorldEvent(org.spongepowered.api.event.world.SaveWorldEvent) TargetWorldEvent(org.spongepowered.api.event.world.TargetWorldEvent) UnloadWorldEvent(org.spongepowered.api.event.world.UnloadWorldEvent) World(org.spongepowered.api.world.World) IMixinWorld(org.spongepowered.common.interfaces.world.IMixinWorld)

Aggregations

EntityJoinWorldEvent (net.minecraftforge.event.entity.EntityJoinWorldEvent)1 WorldEvent (net.minecraftforge.event.world.WorldEvent)1 LoadWorldEvent (org.spongepowered.api.event.world.LoadWorldEvent)1 SaveWorldEvent (org.spongepowered.api.event.world.SaveWorldEvent)1 TargetWorldEvent (org.spongepowered.api.event.world.TargetWorldEvent)1 UnloadWorldEvent (org.spongepowered.api.event.world.UnloadWorldEvent)1 World (org.spongepowered.api.world.World)1 IMixinWorld (org.spongepowered.common.interfaces.world.IMixinWorld)1 IMixinEventBus (org.spongepowered.mod.interfaces.IMixinEventBus)1