List of usage examples for net.minecraftforge.event.entity.player PlayerEvent.LivingUpdateEvent getEntity
public Entity getEntity()
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 } }