Class Npcs
- java.lang.Object
-
- com.runemate.game.api.hybrid.region.Npcs
-
public final class Npcs extends java.lang.Object
For retrieval, sorting, and analysis of Npcs
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 actionstatic java.util.function.Predicate<Npc>
getAppearancePredicate(int... acceptedAppearanceIds)
static java.util.function.Predicate<Npc>
getAreaPredicate(Area... areas)
static Npc
getAt(long uid)
Gets the Npc at a given index/with the given uid in the internal table/array.static java.util.function.Predicate<Npc>
getIdPredicate(int... acceptedIds)
static java.util.function.Predicate<Npc>
getInteractingEntityPredicate(Actor... acceptedIteractingEntities)
static LocatableEntityQueryResults<Npc>
getLoaded()
Gets all loaded Npcsstatic LocatableEntityQueryResults<Npc>
getLoaded(int... ids)
Gets all loaded Npcs with the specified idsstatic LocatableEntityQueryResults<Npc>
getLoaded(Actor target)
Gets all loaded Npcs interacting with the specified Actor (Npc/Player)static LocatableEntityQueryResults<Npc>
getLoaded(java.lang.String... names)
Gets all loaded Npcs with the specified namesstatic LocatableEntityQueryResults<Npc>
getLoaded(java.util.function.Predicate<? super Npc> filter)
Gets all loaded Npcs that are accepted by the filterstatic LocatableEntityQueryResults<Npc>
getLoaded(java.util.regex.Pattern... names)
static LocatableEntityQueryResults<Npc>
getLoadedOn(Coordinate position)
static LocatableEntityQueryResults<Npc>
getLoadedOn(Coordinate position, java.util.function.Predicate<? super Npc> filter)
static LocatableEntityQueryResults<Npc>
getLoadedWithin(Area area)
static LocatableEntityQueryResults<Npc>
getLoadedWithin(Area area, int... ids)
static LocatableEntityQueryResults<Npc>
getLoadedWithin(Area area, java.lang.String... names)
static LocatableEntityQueryResults<Npc>
getLoadedWithin(Area area, java.util.function.Predicate<? super Npc> filter)
static java.util.function.Predicate<Npc>
getModelPredicate(int... acceptedHashes)
Gets a model hash Npc filterstatic 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 namesstatic java.util.function.Predicate<Npc>
getNamePredicate(java.util.regex.Pattern... acceptedNames)
static java.util.function.Predicate<Npc>
getPositionPredicate(Coordinate... coordinates)
static NpcQueryBuilder
newQuery()
-
-
-
Method Detail
-
newQuery
public static NpcQueryBuilder newQuery()
-
getLoaded
public static LocatableEntityQueryResults<Npc> getLoaded()
Gets all loaded Npcs
-
getLoaded
public static LocatableEntityQueryResults<Npc> getLoaded(int... ids)
Gets all loaded Npcs with the specified ids
-
getLoaded
public static LocatableEntityQueryResults<Npc> getLoaded(java.lang.String... names)
Gets all loaded Npcs with the specified names
-
getLoaded
public static LocatableEntityQueryResults<Npc> getLoaded(java.util.regex.Pattern... names)
-
getLoaded
public static LocatableEntityQueryResults<Npc> getLoaded(Actor target)
Gets all loaded Npcs interacting with the specified Actor (Npc/Player)
-
getLoaded
public static LocatableEntityQueryResults<Npc> getLoaded(java.util.function.Predicate<? super Npc> filter)
Gets all loaded Npcs that are accepted by the filter
-
getLoadedOn
public static LocatableEntityQueryResults<Npc> getLoadedOn(Coordinate position, java.util.function.Predicate<? super Npc> filter)
-
getLoadedOn
public static LocatableEntityQueryResults<Npc> getLoadedOn(Coordinate position)
-
getLoadedWithin
public static LocatableEntityQueryResults<Npc> getLoadedWithin(Area area)
-
getLoadedWithin
public static LocatableEntityQueryResults<Npc> getLoadedWithin(Area area, java.util.function.Predicate<? super Npc> filter)
-
getLoadedWithin
public static LocatableEntityQueryResults<Npc> getLoadedWithin(Area area, int... ids)
-
getLoadedWithin
public static LocatableEntityQueryResults<Npc> getLoadedWithin(Area area, java.lang.String... names)
-
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)
-
getIdPredicate
public static java.util.function.Predicate<Npc> getIdPredicate(int... acceptedIds)
-
-