Search in sources :

Example 1 with PlayerLoggedInEvent

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

the class SpongeForgeEventFactory method callPlayerLoggedInEvent.

private static ClientConnectionEvent.Join callPlayerLoggedInEvent(Event event) {
    ClientConnectionEvent.Join spongeEvent = (ClientConnectionEvent.Join) event;
    PlayerLoggedInEvent fmlEvent = new PlayerLoggedInEvent((EntityPlayer) spongeEvent.getTargetEntity());
    ((IMixinEventBus) MinecraftForge.EVENT_BUS).post(fmlEvent, true);
    return spongeEvent;
}
Also used : IMixinEventBus(org.spongepowered.mod.interfaces.IMixinEventBus) ClientConnectionEvent(org.spongepowered.api.event.network.ClientConnectionEvent) PlayerLoggedInEvent(net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent)

Aggregations

PlayerLoggedInEvent (net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent)1 ClientConnectionEvent (org.spongepowered.api.event.network.ClientConnectionEvent)1 IMixinEventBus (org.spongepowered.mod.interfaces.IMixinEventBus)1