Class Friends


  • public class Friends
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static boolean addFriend​(java.lang.String playerName)
      Adds a given name to your friend's list
      static boolean addFriend​(Player player)
      Adds a Player to your friend's list See addFriend(String)
      static java.util.List<Friend> all()
      Gets a list of your friends
      static boolean deleteFriend​(java.lang.String playerName)
      Removes a player from your friends list based on player name
      static boolean deleteFriend​(Friend friend)
      Removes a Friend from your friends list
      static Friend get​(java.lang.String playerName)
      Gets a Friend in your friend list based on player name Auto formats all names checked Looks for both current and previous names of the Friend
      static Friend getFriend​(java.lang.String playerName)
      Deprecated.
      static Friend[] getFriends()
      Deprecated.
      static Friends getFriendsInstance()
      Deprecated.
      no longer used.
      static int getFriendsSize()
      Deprecated.
      static int getSize()
      Gets the size of your friends list
      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
      static boolean isFriendsSelected()
      Checks whether Friends tab type is selected instead of Ignored
      static boolean swapToFriends()
      Swaps to the friend specific tab instead of the ignored tab
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getFriendsInstance

        @Deprecated
        public static Friends getFriendsInstance()
        Deprecated.
        no longer used.
      • getFriends

        @Deprecated
        public static Friend[] getFriends()
        Deprecated.
        See all()
      • 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.
      • 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
      • getFriend

        @Deprecated
        public static Friend getFriend​(java.lang.String playerName)
        Deprecated.
      • get

        public static Friend get​(java.lang.String playerName)
        Gets a Friend in 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:
        Friend instance 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
      • deleteFriend

        public static boolean deleteFriend​(Friend friend)
        Removes a Friend from 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)