Package net.storm.api.widgets
Interface IFriends
public interface IFriends
Interface for interacting with the friends list in the game.
This interface provides methods to query and filter friends by various criteria such as name, world, and online status. It allows checking if specific players are added as friends and retrieving friend information.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault List<net.runelite.api.Friend> getAll(int... worlds) Gets all friends currently on any of the specified worlds.default List<net.runelite.api.Friend> Gets all friends with any of the specified names.List<net.runelite.api.Friend> Gets all friends that match the specified filter predicate.default net.runelite.api.FriendgetFirst(int... worlds) Gets the first friend currently on any of the specified worlds.default net.runelite.api.FriendGets the first friend with any of the specified names.default net.runelite.api.FriendGets the first friend that matches the specified filter predicate.booleanChecks if a player with the specified name is on the friends list.booleanChecks if a friend with the specified name is currently online.default booleanisOnline(net.runelite.api.Friend friend) Checks if the specified friend is currently online.
-
Method Details
-
getAll
Gets all friends that match the specified filter predicate.- Parameters:
filter- the predicate to filter friends- Returns:
- a list of friends matching the filter
-
getAll
Gets all friends with any of the specified names.- Parameters:
names- the names to search for (exact match)- Returns:
- a list of friends with matching names
-
getAll
Gets all friends currently on any of the specified worlds.- Parameters:
worlds- the world numbers to filter by- Returns:
- a list of friends on the specified worlds
-
getFirst
Gets the first friend that matches the specified filter predicate.- Parameters:
filter- the predicate to filter friends- Returns:
- the first matching friend, or
nullif none found
-
getFirst
Gets the first friend with any of the specified names.- Parameters:
names- the names to search for (exact match)- Returns:
- the first matching friend, or
nullif none found
-
getFirst
default net.runelite.api.Friend getFirst(int... worlds) Gets the first friend currently on any of the specified worlds.- Parameters:
worlds- the world numbers to filter by- Returns:
- the first matching friend, or
nullif none found
-
isAdded
Checks if a player with the specified name is on the friends list.- Parameters:
name- the player name to check- Returns:
trueif the player is added as a friend,falseotherwise
-
isOnline
default boolean isOnline(net.runelite.api.Friend friend) Checks if the specified friend is currently online.- Parameters:
friend- the friend to check- Returns:
trueif the friend is online,falseotherwise
-
isOnline
Checks if a friend with the specified name is currently online.- Parameters:
name- the friend's name to check- Returns:
trueif the friend is online,falseotherwise
-