Exemple #1
0
  public boolean inBounds(final Location locationToCheck) {
    if (!locationToCheck.getWorld().equals(getPointOne().getWorld())) {
      return false;
    }

    // For open worlds that do not have specified points
    if (globalRegion) {
      return false; // needs to return false to allow nested override
    }

    return locationToCheck
        .toVector()
        .isInAABB(
            Vector.getMinimum(getPointOne().toVector(), getPointTwo().toVector()),
            Vector.getMaximum(getPointOne().toVector(), getPointTwo().toVector()));
  }