Package org.dreambot.api.methods.friend
Class Friends
- java.lang.Object
-
- org.dreambot.api.methods.friend.Friends
-
public class Friends extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaddFriend(java.lang.String playerName)Adds a given name to your friend's liststatic booleanaddFriend(Player player)Adds aPlayerto your friend's list SeeaddFriend(String)static java.util.List<Friend>all()Gets a list of your friendsstatic booleandeleteFriend(java.lang.String playerName)Removes a player from your friends list based on player namestatic booleandeleteFriend(Friend friend)Removes aFriendfrom your friends liststatic Friendget(java.lang.String playerName)Gets aFriendin your friend list based on player name Auto formats all names checked Looks for both current and previous names of the Friendstatic FriendgetFriend(java.lang.String playerName)Deprecated.seeget(String)static Friend[]getFriends()Deprecated.static FriendsgetFriendsInstance()Deprecated.no longer used.static intgetFriendsSize()Deprecated.seegetSize()static intgetSize()Gets the size of your friends liststatic booleanhaveFriend(java.lang.String playerName)Checks if a player's name is inside of your friends list Auto formats non-alphabetical/numerical characters to spaces Checks both current and previous names on the Friendstatic booleanisFriendsSelected()Checks whether Friends tab type is selected instead of Ignoredstatic booleansendMessage(java.lang.String playerName, java.lang.String message)Sends a message to a friendstatic booleanswapToFriends()Swaps to the friend specific tab instead of the ignored tab
-
-
-
Method Detail
-
getFriendsInstance
@Deprecated public static Friends getFriendsInstance()
Deprecated.no longer used.
-
all
public static java.util.List<Friend> all()
Gets a list of your friends
-
swapToFriends
public static boolean swapToFriends()
Swaps to the friend specific tab instead of the ignored tab- Returns:
- True if friends already selected or if successfully swaps
-
getFriendsSize
@Deprecated public static int getFriendsSize()
Deprecated.seegetSize()
-
getSize
public static int getSize()
Gets the size of your friends list- Returns:
- the size of your friends list, 0 if the friends handler is null
-
isFriendsSelected
public static boolean isFriendsSelected()
Checks whether Friends tab type is selected instead of Ignored
-
haveFriend
public static boolean haveFriend(java.lang.String playerName)
Checks if a player's name is inside of your friends list Auto formats non-alphabetical/numerical characters to spaces Checks both current and previous names on the Friend- Parameters:
playerName- Player name to look for- Returns:
- False if player name is null or empty. True if the player name is found in the friends list, else false
-
sendMessage
public static boolean sendMessage(java.lang.String playerName, java.lang.String message)Sends a message to a friend- Parameters:
playerName- the friend's display namemessage- the message to send to the friend- Returns:
- true if we're able to successfully send the message
-
getFriend
@Deprecated public static Friend getFriend(java.lang.String playerName)
Deprecated.seeget(String)
-
get
public static Friend get(java.lang.String playerName)
Gets aFriendin your friend list based on player name Auto formats all names checked Looks for both current and previous names of the Friend- Parameters:
playerName- Player name to look for- Returns:
Friendinstance if found, null if player name is empty/null or if the player is not found
-
addFriend
public static boolean addFriend(java.lang.String playerName)
Adds a given name to your friend's list- Parameters:
playerName- Name of player to add to friend's list- Returns:
- True if friend already in list or if successfully added to friends list, else false
-
addFriend
public static boolean addFriend(Player player)
Adds aPlayerto your friend's list SeeaddFriend(String)- Returns:
- false if player is null, else see
addFriend(String)
-
deleteFriend
public static boolean deleteFriend(Friend friend)
Removes aFriendfrom your friends list- Parameters:
friend- Friend to remove from friends list- Returns:
- True if friend is null, friend does not exist in list, or if successfully removed friend, else false
-
deleteFriend
public static boolean deleteFriend(java.lang.String playerName)
Removes a player from your friends list based on player name- Parameters:
playerName- Player name to remove from friends list- Returns:
- False if no friend found from player name, else see
deleteFriend(Friend)
-
-