Package com.kraken.api.query.player
Class PlayerQuery
- java.lang.Object
-
- com.kraken.api.core.AbstractQuery<PlayerEntity,PlayerQuery,net.runelite.api.Player>
-
- com.kraken.api.query.player.PlayerQuery
-
public class PlayerQuery extends AbstractQuery<PlayerEntity,PlayerQuery,net.runelite.api.Player>
-
-
Field Summary
-
Fields inherited from class com.kraken.api.core.AbstractQuery
ctx
-
-
Constructor Summary
Constructors Constructor Description PlayerQuery(Context ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlayerQueryat(net.runelite.api.coords.WorldPoint location)Returns a stream of Players at a given world point.PlayerQuerycombatLevelGreaterThan(int level)Finds players with a combat level strictly greater than the given argumentPlayerQueryinteractingWith(net.runelite.api.Actor actor)Filters the stream for players interacting with a specified actorLocalPlayerEntitylocal()Directly retrieves the local player wrapper.PlayerEntitynearest()Finds the nearest player to the local player.PlayerQuerysortByDistance()Sorts the player stream by distance from the local players current location.protected java.util.function.Supplier<java.util.stream.Stream<PlayerEntity>>source()PlayerQuerywithinArea(net.runelite.api.coords.WorldPoint minimum, net.runelite.api.coords.WorldPoint max)Filters for players within a specified area.PlayerQuerywithinDistance(int distance)Filters the stream for players within a specified distance from the local player.PlayerQuerywithinLevel(int low, int high)Filters the stream for players within a specified combat level (inclusive).
-
-
-
Constructor Detail
-
PlayerQuery
public PlayerQuery(Context ctx)
-
-
Method Detail
-
source
protected java.util.function.Supplier<java.util.stream.Stream<PlayerEntity>> source()
- Specified by:
sourcein classAbstractQuery<PlayerEntity,PlayerQuery,net.runelite.api.Player>
-
interactingWith
public PlayerQuery interactingWith(net.runelite.api.Actor actor)
Filters the stream for players interacting with a specified actor- Parameters:
actor- The actor to check for interacting with- Returns:
- PlayerQuery
-
at
public PlayerQuery at(net.runelite.api.coords.WorldPoint location)
Returns a stream of Players at a given world point.- Parameters:
location- The world point to check- Returns:
- PlayerQuery
-
withinArea
public PlayerQuery withinArea(net.runelite.api.coords.WorldPoint minimum, net.runelite.api.coords.WorldPoint max)
Filters for players within a specified area. The min WorldPoint should be the southwest tile of the area and the max WorldPoint should be the northeast tile of the area.- Parameters:
minimum- The southwest minimum world point of the area to checkmax- The northeast maximum world point of the area to check- Returns:
- NpcQuery
-
withinDistance
public PlayerQuery withinDistance(int distance)
Filters the stream for players within a specified distance from the local player.- Parameters:
distance- The maximum distance from the local player.- Returns:
- PlayerQuery
-
withinLevel
public PlayerQuery withinLevel(int low, int high)
Filters the stream for players within a specified combat level (inclusive).- Parameters:
low- The minimum combat level boundhigh- The maximum combat level bound- Returns:
- PlayerQuery
-
combatLevelGreaterThan
public PlayerQuery combatLevelGreaterThan(int level)
Finds players with a combat level strictly greater than the given argument- Parameters:
level- Combat level- Returns:
- PlayerQuery
-
nearest
public PlayerEntity nearest()
Finds the nearest player to the local player.- Returns:
- PlayerQuery
-
sortByDistance
public PlayerQuery sortByDistance()
Sorts the player stream by distance from the local players current location.- Returns:
- PlayerQuery
-
local
public LocalPlayerEntity local()
Directly retrieves the local player wrapper. Does not use the filter list.- Returns:
- PlayerEntity the
LocalPlayerEntityobject.
-
-