Class Npcs


  • public final class Npcs
    extends java.lang.Object
    For retrieval, sorting, and analysis of Npcs
    • Method Detail

      • getLoaded

        public static LocatableEntityQueryResults<Npc> getLoaded​(java.util.function.Predicate<? super Npc> filter)
        Gets all loaded Npcs that are accepted by the filter
      • getAt

        public static Npc getAt​(long uid)
        Gets the Npc at a given index/with the given uid in the internal table/array.
      • getNamePredicate

        public static java.util.function.Predicate<Npc> getNamePredicate​(java.lang.String... acceptedNames)
        Gets a Npc filter that can be used to get a Npc with one of the specified names
        Parameters:
        acceptedNames - the names that are valid (case-sensitive)
        Returns:
        a filter
      • getNamePredicate

        public static java.util.function.Predicate<Npc> getNamePredicate​(java.util.regex.Pattern... acceptedNames)
      • getInteractingEntityPredicate

        public static java.util.function.Predicate<Npc> getInteractingEntityPredicate​(Actor... acceptedIteractingEntities)
      • getActionPredicate

        public static java.util.function.Predicate<Npc> getActionPredicate​(java.lang.String... acceptedActions)
        Gets an Npc filter that can be used to get an with one of the specified action
        Parameters:
        acceptedActions - the powers that are valid (case-sensitive)
        Returns:
        a filter
      • getModelPredicate

        public static java.util.function.Predicate<Npc> getModelPredicate​(int... acceptedHashes)
        Gets a model hash Npc filter
      • getAppearancePredicate

        public static java.util.function.Predicate<Npc> getAppearancePredicate​(int... acceptedAppearanceIds)
      • getPositionPredicate

        public static java.util.function.Predicate<Npc> getPositionPredicate​(Coordinate... coordinates)
      • getAreaPredicate

        public static java.util.function.Predicate<Npc> getAreaPredicate​(Area... areas)
      • getIdPredicate

        public static java.util.function.Predicate<Npc> getIdPredicate​(int... acceptedIds)