Example usage for net.minecraftforge.event.entity.player PlayerEvent.LivingUpdateEvent getEntity

List of usage examples for net.minecraftforge.event.entity.player PlayerEvent.LivingUpdateEvent getEntity

Introduction

In this page you can find the example usage for net.minecraftforge.event.entity.player PlayerEvent.LivingUpdateEvent getEntity.

Prototype

public Entity getEntity() 

Source Link

Usage

From source file:com.lothrazar.cyclicmagic.playerupgrade.EventExtendedInventory.java

License:Open Source License

@SubscribeEvent
public void playerTick(PlayerEvent.LivingUpdateEvent event) {
    // player events
    if (event.getEntity() instanceof EntityPlayer) {
        EntityPlayer player = (EntityPlayer) event.getEntity();
        if (!UtilPlayerInventoryFilestorage.playerEntityIds.isEmpty()
                && UtilPlayerInventoryFilestorage.playerEntityIds.contains(player.getEntityId())) {
            UtilPlayerInventoryFilestorage.syncItems(player);
            UtilPlayerInventoryFilestorage.playerEntityIds.remove(player.getEntityId());
        }//from   w  w w. jav  a2 s .c om
    }
}