Class Friends

java.lang.Object
privbot.hooks.Friends

public final class Friends extends Object
Friends list queries via RuneLite's Client.
  • Constructor Details

    • Friends

      public Friends(net.runelite.api.Client client)
      Parameters:
      client - the client
  • Method Details

    • isFriend

      public boolean isFriend(String name)
      Parameters:
      name - a player name (colour and icon tags are ignored, case-insensitive)
      Returns:
      whether the name is on the friends list; false also when the list cannot be read
    • getFriends

      public List<String> getFriends()
      Returns:
      the names on the friends list; empty when the list is empty or cannot be read (never null)
    • isOnline

      public boolean isOnline(String name)
      Parameters:
      name - a friend's name
      Returns:
      whether that friend is on a world; false when not a friend, offline, or unreadable
    • getWorld

      public int getWorld(String name)
      Parameters:
      name - a friend's name
      Returns:
      the friend's world, 0 when offline, -1 when not on the list or unreadable