Class PlayerQuery

    • Constructor Detail

      • PlayerQuery

        public PlayerQuery​(Context ctx)
    • Method Detail

      • 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 check
        max - 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 bound
        high - 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 LocalPlayerEntity object.