@Override
  public void activate(EventParser eventParser) {
    super.activate(eventParser);

    for (Quester quester : party.getQuesterArray()) {
      quester.setHealth((int) (quester.getMaxHealth() * percent));
    }
  }
Exemplo n.º 2
0
  @Override
  public void activate(EventParser eventParser) {
    super.activate(eventParser);

    for (Quester quester : target.getTargets()) {
      if (quester.getPlayer() != null) {
        quester.getPlayer().setVelocity(vel);
      }
    }
  }
  @Override
  public List<Quester> getTargets() {
    List<Quester> questers = new ArrayList<Quester>();

    for (Quester q : MineQuest.questerHandler.getQuesters()) {
      if (q.getPlayer() != null) {
        if (MineQuest.distance(q.getPlayer().getLocation(), location) < radius) {
          questers.add(q);
        }
      }
    }

    return questers;
  }