Exemplo n.º 1
0
  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);
  }
Exemplo n.º 2
0
 @Override
 public Location getCompassTarget() {
   return caller.getCompassTarget();
 }