Search in sources :

Example 1 with MessageServerPlayerLeftTrackingRange

use of riskyken.armourersWorkshop.common.network.messages.server.MessageServerPlayerLeftTrackingRange in project Armourers-Workshop by RiskyKen.

the class EntityEquipmentDataManager method onStopTracking.

@SubscribeEvent
public void onStopTracking(PlayerEvent.StopTracking event) {
    if (event.target instanceof EntityPlayerMP) {
        EntityPlayerMP target = (EntityPlayerMP) event.target;
        MessageServerPlayerLeftTrackingRange message = new MessageServerPlayerLeftTrackingRange(new PlayerPointer(target));
        PacketHandler.networkWrapper.sendTo(message, (EntityPlayerMP) event.entityPlayer);
    }
}
Also used : PlayerPointer(riskyken.armourersWorkshop.common.data.PlayerPointer) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP) MessageServerPlayerLeftTrackingRange(riskyken.armourersWorkshop.common.network.messages.server.MessageServerPlayerLeftTrackingRange) SubscribeEvent(cpw.mods.fml.common.eventhandler.SubscribeEvent)

Aggregations

SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)1 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)1 PlayerPointer (riskyken.armourersWorkshop.common.data.PlayerPointer)1 MessageServerPlayerLeftTrackingRange (riskyken.armourersWorkshop.common.network.messages.server.MessageServerPlayerLeftTrackingRange)1