예제 #1
0
  public int getAmountEntitiesNearby() {

    int amount = 0;

    for (RunsafeEntity entity : location.getWorld().getEntities())
      if (entity instanceof RunsafeLivingEntity && !(entity instanceof RunsafePlayer))
        if (entity.getLocation().distanceSquared(location) <= r) amount++;

    return amount;
  }
 @Override
 public void setLeashHolder(RunsafeEntity entity) {
   livingEntity.setLeashHolder(entity.getRaw());
 }