Search in sources :

Example 1 with PlayerRespawnEvent

use of net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent in project SpongeForge by SpongePowered.

the class SpongeForgeEventFactory method callPlayerRespawnEvent.

private static RespawnPlayerEvent callPlayerRespawnEvent(Event event) {
    RespawnPlayerEvent spongeEvent = (RespawnPlayerEvent) event;
    PlayerRespawnEvent fmlEvent = new PlayerRespawnEvent((EntityPlayer) spongeEvent.getTargetEntity(), !spongeEvent.isDeath());
    ((IMixinEventBus) MinecraftForge.EVENT_BUS).post(fmlEvent, true);
    return spongeEvent;
}
Also used : IMixinEventBus(org.spongepowered.mod.interfaces.IMixinEventBus) PlayerRespawnEvent(net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent) RespawnPlayerEvent(org.spongepowered.api.event.entity.living.humanoid.player.RespawnPlayerEvent)

Aggregations

PlayerRespawnEvent (net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent)1 RespawnPlayerEvent (org.spongepowered.api.event.entity.living.humanoid.player.RespawnPlayerEvent)1 IMixinEventBus (org.spongepowered.mod.interfaces.IMixinEventBus)1