Package org.tribot.script.sdk.query
Interface PositionableQuery<EntityType extends Positionable,QueryType extends Query<EntityType,QueryType>>
-
- All Superinterfaces:
Query<EntityType,QueryType>
- All Known Subinterfaces:
CharacterQuery<EntityType,QueryType>
,InteractableQuery<EntityType,QueryType>
- All Known Implementing Classes:
GameObjectQuery
,GraphicObjectQuery
,GroundItemQuery
,NpcQuery
,PlayerQuery
,ProjectileQuery
,TileQuery
public interface PositionableQuery<EntityType extends Positionable,QueryType extends Query<EntityType,QueryType>> extends Query<EntityType,QueryType>
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.Optional<EntityType>
findClosest()
Executes this query and gets the closest matching entity to our playerdefault java.util.Optional<EntityType>
findClosestByPathDistance()
Executes this query and gets the closest matching entity to our player, based on path distance (the distance it would take to actually walk there based on the surrounding obstacles/collision)default QueryType
hasLineOfSightTo(Positionable other)
Unmaintained.default QueryType
inArea(Area... area)
Only match entities in the specified areasdefault QueryType
isInLineOfSight()
Unmaintained.default QueryType
isInLineOfSight(Positionable source)
Unmaintained.default QueryType
isOnMinimap()
Only match entities that are on the minimapdefault QueryType
isReachable()
Only match entities that are reachable viaLocalWalking.Map.canReach(Positionable)
obtained fromLocalWalking.createMap()
default QueryType
maxDistance(double maxDistance)
Only match entities who are at most the specified distance away from our playerdefault QueryType
maxDistance(Positionable source, double maxDistance)
Only match entities who are at most the specified distance away from the specified locationdefault QueryType
maxPathDistance(double maxDistance)
Only match entities who are at most the specified path distance away from our player (the distance it would take to actually walk there based on the surrounding obstacles/collision)default QueryType
minDistance(double min)
Only match entities who are at least the specified distance away from our playerdefault QueryType
minDistance(Positionable source, double min)
Only match entities who are at least the specified distance away from the specified locationdefault QueryType
minPathDistance(double min)
Only match entities who are at least the specified path distance away from our player (the distance it would take to actually walk there based on the surrounding obstacles/collision)default QueryType
notInArea(Area... area)
Only match entities who are not in any of the specified areasdefault QueryType
sortedByDistance()
Sorts the entities by their distance to our player, with the closest appearing firstdefault QueryType
sortedByDistance(Positionable source)
Sorts the entities by their distance to the specified location, with the closest appearing firstdefault QueryType
sortedByPathDistance()
Sorts the entities by their path distance (the distance it would take to actually walk there based on the surrounding obstacles/collision)default QueryType
tileEquals(Positionable... positions)
Only matches entities at the specified positionsdefault QueryType
tileNotEquals(Positionable... positions)
Only match entities who are not at any of the specified positions
-
-
-
Method Detail
-
isReachable
default QueryType isReachable()
Only match entities that are reachable viaLocalWalking.Map.canReach(Positionable)
obtained fromLocalWalking.createMap()
- Returns:
- this query
-
isOnMinimap
default QueryType isOnMinimap()
Only match entities that are on the minimap- Returns:
- this query
-
findClosest
default java.util.Optional<EntityType> findClosest()
Executes this query and gets the closest matching entity to our player- Returns:
- the closest matching entity, or an empty optional if none matched
-
findClosestByPathDistance
default java.util.Optional<EntityType> findClosestByPathDistance()
Executes this query and gets the closest matching entity to our player, based on path distance (the distance it would take to actually walk there based on the surrounding obstacles/collision)- Returns:
- the closest matching entity, or an empty optional if none matched
-
tileEquals
default QueryType tileEquals(Positionable... positions)
Only matches entities at the specified positions- Parameters:
positions
- the positions to check- Returns:
- this query
-
inArea
default QueryType inArea(Area... area)
Only match entities in the specified areas- Parameters:
area
- the areas to check- Returns:
- this query
-
tileNotEquals
default QueryType tileNotEquals(Positionable... positions)
Only match entities who are not at any of the specified positions- Parameters:
positions
- the positions to check- Returns:
- this query
-
notInArea
default QueryType notInArea(Area... area)
Only match entities who are not in any of the specified areas- Parameters:
area
- the areas to check- Returns:
- this query
-
maxDistance
default QueryType maxDistance(double maxDistance)
Only match entities who are at most the specified distance away from our player- Parameters:
maxDistance
- the max distance of entities to find- Returns:
- this query
-
maxDistance
default QueryType maxDistance(Positionable source, double maxDistance)
Only match entities who are at most the specified distance away from the specified location- Parameters:
source
- the position to use as the base for calculating the entities distance frommaxDistance
- the max distance of entities to find- Returns:
- this query
-
maxPathDistance
default QueryType maxPathDistance(double maxDistance)
Only match entities who are at most the specified path distance away from our player (the distance it would take to actually walk there based on the surrounding obstacles/collision)- Parameters:
maxDistance
- the max distance of entities to find- Returns:
- this query
-
minDistance
default QueryType minDistance(double min)
Only match entities who are at least the specified distance away from our player- Parameters:
min
- the min distance of entities to find- Returns:
- this query
-
minPathDistance
default QueryType minPathDistance(double min)
Only match entities who are at least the specified path distance away from our player (the distance it would take to actually walk there based on the surrounding obstacles/collision)- Parameters:
min
- the min distance of entities to find- Returns:
- this query
-
minDistance
default QueryType minDistance(Positionable source, double min)
Only match entities who are at least the specified distance away from the specified location- Parameters:
source
- the position to use as the base for calculating the entities distance frommin
- the min distance of entities to find- Returns:
- this query
-
sortedByDistance
default QueryType sortedByDistance()
Sorts the entities by their distance to our player, with the closest appearing first- Returns:
- this query
-
sortedByDistance
default QueryType sortedByDistance(Positionable source)
Sorts the entities by their distance to the specified location, with the closest appearing first- Parameters:
source
- the position to use as the base for calculating the entities distance from- Returns:
- this query
-
sortedByPathDistance
default QueryType sortedByPathDistance()
Sorts the entities by their path distance (the distance it would take to actually walk there based on the surrounding obstacles/collision)- Returns:
- this query
-
isInLineOfSight
default QueryType isInLineOfSight()
Unmaintained. Only match entities that are in the line of sight- Returns:
- this query
-
hasLineOfSightTo
default QueryType hasLineOfSightTo(Positionable other)
Unmaintained. Only match entities that have line of sight to the target- Parameters:
other
- the target entity- Returns:
- this query
-
isInLineOfSight
default QueryType isInLineOfSight(Positionable source)
Unmaintained. Only match entities that are in the line of sight of the source- Parameters:
source
- the source position- Returns:
- this query
-
-