Class PartyFriendsAPI


  • public class PartyFriendsAPI
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      PartyFriendsAPI()  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void acceptFriendRequest​(org.bukkit.entity.Player pPlayer, java.lang.String pFriend)
      Accepts a friend request (runs through the /friend accept command)
      static void addCustomSetting​(ItemPackage pSetting)
      Adds a setting to the Party and Friends GUI settings interface
      static void changeMessageSetting​(org.bukkit.entity.Player pPlayer)
      Changes the receive messages setting
      static void changeSetting​(org.bukkit.entity.Player pPlayer, java.lang.String pSettingName)  
      static void changeSettingFriendRequests​(org.bukkit.entity.Player pPlayer)
      Changes the friend request setting
      static void changeSettingJump​(org.bukkit.entity.Player pPlayer)
      Changes the jump setting
      static void changeSettingOffline​(org.bukkit.entity.Player pPlayer)
      Changes the show always as offline setting
      static void changeSettingParty​(org.bukkit.entity.Player pPlayer)
      Changes the setting who can invite the player into a party
      static void declineFriendRequest​(org.bukkit.entity.Player pPlayer, java.lang.String toDeny)
      Declines a friend request (runs through the /friend deny command)
      static void deleteFriend​(org.bukkit.entity.Player pPlayer, java.lang.String pFriend)
      Removes a friend
      static void executeBungeeCordCommand​(java.lang.String pCommand, org.bukkit.entity.Player pPlayer)
      Executes a BungeeCord command
      static java.util.ArrayList<ItemPackage> getCustomSettings()  
      static void inviteIntoParty​(org.bukkit.entity.Player pInviter, java.lang.String pInvited)
      Invites a player into a party
      static void jumpTo​(org.bukkit.entity.Player pPlayer, java.lang.String pFriend)
      The player who should jump to a friend (runs through the /friend jump command)
      static void kickPlayer​(org.bukkit.entity.Player pSender, java.lang.String pToKick)  
      static void leaveParty​(org.bukkit.entity.Player pPlayer)  
      static void loadHideMode​(org.bukkit.entity.Player pPlayer, boolean pJoin)
      Reloads the hide mode for a specific player
      static void makeLeader​(org.bukkit.entity.Player pSender, java.lang.String pNewLeader)  
      static void openFriendRequestsMenu​(org.bukkit.entity.Player pPlayer)
      Opens the friend request inventory
      static void openHideInventory​(org.bukkit.entity.Player pPlayer)
      Opens the hide inventory
      static void openMainInventory​(org.bukkit.entity.Player pPlayer, int pPage)
      Opens the main inventory
      static void openPartyInventory​(org.bukkit.entity.Player pPlayer, int pPage)
      Opens the party inventory
      static void openSettingsInventory​(org.bukkit.entity.Player pPlayer)
      Opens the settings inventory
      static void sendFriendRequest​(org.bukkit.entity.Player pRequester, java.lang.String pRequested)
      Deprecated.
      static void sendMessage​(com.google.gson.JsonObject pJObj, org.bukkit.entity.Player pPlayer)  
      static void sendOrAcceptFriendRequest​(org.bukkit.entity.Player pRequester, java.lang.String pRequested)  
      static void setHideMode​(org.bukkit.entity.Player pPlayer, int worth)
      Sets the hide mode of a player.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PartyFriendsAPI

        public PartyFriendsAPI()
    • Method Detail

      • addCustomSetting

        public static void addCustomSetting​(ItemPackage pSetting)
        Adds a setting to the Party and Friends GUI settings interface
        Parameters:
        pSetting - The setting
        See Also:
        ItemPackage
      • getCustomSettings

        public static java.util.ArrayList<ItemPackage> getCustomSettings()
        Returns:
        Returns the settings which will be added into the settings interface of the Party and Friends GUI settings
      • openMainInventory

        public static void openMainInventory​(org.bukkit.entity.Player pPlayer,
                                             int pPage)
        Opens the main inventory
        Parameters:
        pPlayer - For whom the main inventory should be open
        pPage - The page that should be opened
      • openPartyInventory

        public static void openPartyInventory​(org.bukkit.entity.Player pPlayer,
                                              int pPage)
        Opens the party inventory
        Parameters:
        pPlayer - For whom the party inventory should be open
        pPage - The page that should be opened
      • openHideInventory

        public static void openHideInventory​(org.bukkit.entity.Player pPlayer)
        Opens the hide inventory
        Parameters:
        pPlayer - For whom the hide inventory should be open
      • openFriendRequestsMenu

        public static void openFriendRequestsMenu​(org.bukkit.entity.Player pPlayer)
        Opens the friend request inventory
        Parameters:
        pPlayer - For whom the friend request inventory should be open
      • openSettingsInventory

        public static void openSettingsInventory​(org.bukkit.entity.Player pPlayer)
        Opens the settings inventory
        Parameters:
        pPlayer - For whom the settings inventory should be open
      • setHideMode

        public static void setHideMode​(org.bukkit.entity.Player pPlayer,
                                       int worth)
        Sets the hide mode of a player.
        Parameters:
        pPlayer - The player for whom the hide mode should be set.
        worth - Possible worth:
        • 0 Shows all Players
        • 1 Show only Friends and people of the server team
        • 2 Show only friends
        • 3 Show only people of the server team
        • 4 Hide all players
      • loadHideMode

        public static void loadHideMode​(org.bukkit.entity.Player pPlayer,
                                        boolean pJoin)
        Reloads the hide mode for a specific player
        Parameters:
        pPlayer - The player for whom the hide mode should be reloaded
        pJoin - If he just joined
      • sendFriendRequest

        @Deprecated
        public static void sendFriendRequest​(org.bukkit.entity.Player pRequester,
                                             java.lang.String pRequested)
        Deprecated.
        Sends a player a friend request
        Parameters:
        pRequester - The sender of the friend request
        pRequested - The receiver
      • sendOrAcceptFriendRequest

        public static void sendOrAcceptFriendRequest​(org.bukkit.entity.Player pRequester,
                                                     java.lang.String pRequested)
      • acceptFriendRequest

        public static void acceptFriendRequest​(org.bukkit.entity.Player pPlayer,
                                               java.lang.String pFriend)
        Accepts a friend request (runs through the /friend accept command)
        Parameters:
        pPlayer - The player who accepts the friend request
        pFriend - The friend request who should be accept
      • declineFriendRequest

        public static void declineFriendRequest​(org.bukkit.entity.Player pPlayer,
                                                java.lang.String toDeny)
        Declines a friend request (runs through the /friend deny command)
        Parameters:
        pPlayer - The player who is denying the friend request
        toDeny - The rejected friend request
      • deleteFriend

        public static void deleteFriend​(org.bukkit.entity.Player pPlayer,
                                        java.lang.String pFriend)
        Removes a friend
        Parameters:
        pPlayer - The player who removes the friend
        pFriend - The friend who should be removed
      • jumpTo

        public static void jumpTo​(org.bukkit.entity.Player pPlayer,
                                  java.lang.String pFriend)
        The player who should jump to a friend (runs through the /friend jump command)
        Parameters:
        pPlayer - The player who jumps to the friend
        pFriend - The friend who should be jump to
      • kickPlayer

        public static void kickPlayer​(org.bukkit.entity.Player pSender,
                                      java.lang.String pToKick)
      • makeLeader

        public static void makeLeader​(org.bukkit.entity.Player pSender,
                                      java.lang.String pNewLeader)
      • leaveParty

        public static void leaveParty​(org.bukkit.entity.Player pPlayer)
      • inviteIntoParty

        public static void inviteIntoParty​(org.bukkit.entity.Player pInviter,
                                           java.lang.String pInvited)
        Invites a player into a party
        Parameters:
        pInviter - The inviter
        pInvited - The player who should be invited into the party
      • changeSetting

        public static void changeSetting​(org.bukkit.entity.Player pPlayer,
                                         java.lang.String pSettingName)
      • changeSettingFriendRequests

        public static void changeSettingFriendRequests​(org.bukkit.entity.Player pPlayer)
        Changes the friend request setting
        Parameters:
        pPlayer - The player for whom the setting should be changed
      • changeSettingParty

        public static void changeSettingParty​(org.bukkit.entity.Player pPlayer)
        Changes the setting who can invite the player into a party
        Parameters:
        pPlayer - The player for whom the setting should be changed
      • changeSettingOffline

        public static void changeSettingOffline​(org.bukkit.entity.Player pPlayer)
        Changes the show always as offline setting
        Parameters:
        pPlayer - The player for whom the setting should be changed
      • changeSettingJump

        public static void changeSettingJump​(org.bukkit.entity.Player pPlayer)
        Changes the jump setting
        Parameters:
        pPlayer - The player for whom the setting should be changed
      • changeMessageSetting

        public static void changeMessageSetting​(org.bukkit.entity.Player pPlayer)
        Changes the receive messages setting
        Parameters:
        pPlayer - The player for whom the setting should be changed
      • executeBungeeCordCommand

        public static void executeBungeeCordCommand​(java.lang.String pCommand,
                                                    org.bukkit.entity.Player pPlayer)
        Executes a BungeeCord command
        Parameters:
        pCommand - The command (inclusive the arguments) which should be executed
        pPlayer - The player who will be executing the command
      • sendMessage

        public static void sendMessage​(com.google.gson.JsonObject pJObj,
                                       org.bukkit.entity.Player pPlayer)