Class LocatableEntityQueryResults<T extends LocatableEntity>

    • Constructor Detail

      • LocatableEntityQueryResults

        public LocatableEntityQueryResults​(java.util.Collection<? extends T> results)
      • LocatableEntityQueryResults

        public LocatableEntityQueryResults​(java.util.Collection<? extends T> results,
                                           java.util.concurrent.ConcurrentMap<java.lang.String,​java.lang.Object> cache)
    • Method Detail

      • sortByDistance

        public final LocatableEntityQueryResults<T> sortByDistance()
        Calls sort(Comparator) with a Comparator that will sort the list by distance from the local player (nearest first)
      • sortByDistanceFrom

        public final LocatableEntityQueryResults<T> sortByDistanceFrom​(Locatable center)
        Calls sort(Comparator) with a Comparator that will sort the list by distance from the local player (nearest first)
      • nearest

        @Nullable
        public final T nearest()
        Gets the nearest entity to the local player. If two or more entities are tied for the place of nearest then one will be selected according to the active player sense profile.
      • nearestTo

        @Nullable
        public final T nearestTo​(Locatable locatable)
        Gets the nearest entity to the given locatable. If two or more entities are tied for the place of nearest then one will be selected according to the active player sense profile.
      • furthest

        @Nullable
        public final T furthest()
        Gets the furthest entity to the local player. If two or more entities are tied for the place of furthest then one will be selected according to the active player sense profile.
      • furthestFrom

        @Nullable
        public final T furthestFrom​(Locatable locatable)