@Override public List<IHackableEntity> getCurrentEntityHacks(Entity entity) { HackingEntityProperties hackingProps = (HackingEntityProperties) entity.getExtendedProperties("PneumaticCraftHacking"); if (hackingProps != null) { List<IHackableEntity> hackables = hackingProps.getCurrentHacks(); if (hackables != null) return hackables; } else { Log.warning( "Extended entity props HackingEntityProperties couldn't be found in the entity " + entity.getCommandSenderName()); } return new ArrayList<IHackableEntity>(); }
public static PlayerInformation forPlayer(Entity player) { return (PlayerInformation) player.getExtendedProperties(IDENTIFIER); }