public GamePlayerData(Player player, boolean isPlayer) { this.name = player.getName(); this.isPlayer = isPlayer; this.originLoc = player.getLocation(); this.compassTarget = player.getCompassTarget(); this.health = player.getHealth(); this.food = player.getFoodLevel(); this.saturation = player.getSaturation(); this.inv = player.getInventory().getContents(); this.armor = player.getInventory().getArmorContents(); player.getInventory().clear(); this.exp = player.getTotalExperience(); player.setTotalExperience(0); }
@Override public Location getCompassTarget() { return caller.getCompassTarget(); }