Class PartyFriendsAPI
- java.lang.Object
-
- de.simonsator.partyandfriendsgui.api.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 interfacestatic void
changeMessageSetting(org.bukkit.entity.Player pPlayer)
Changes the receive messages settingstatic void
changeSetting(org.bukkit.entity.Player pPlayer, java.lang.String pSettingName)
static void
changeSettingFriendRequests(org.bukkit.entity.Player pPlayer)
Changes the friend request settingstatic void
changeSettingJump(org.bukkit.entity.Player pPlayer)
Changes the jump settingstatic void
changeSettingOffline(org.bukkit.entity.Player pPlayer)
Changes the show always as offline settingstatic void
changeSettingParty(org.bukkit.entity.Player pPlayer)
Changes the setting who can invite the player into a partystatic 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 friendstatic void
executeBungeeCordCommand(java.lang.String pCommand, org.bukkit.entity.Player pPlayer)
Executes a BungeeCord commandstatic java.util.ArrayList<ItemPackage>
getCustomSettings()
static void
inviteIntoParty(org.bukkit.entity.Player pInviter, java.lang.String pInvited)
Invites a player into a partystatic 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 playerstatic void
makeLeader(org.bukkit.entity.Player pSender, java.lang.String pNewLeader)
static void
openFriendRequestsMenu(org.bukkit.entity.Player pPlayer)
Opens the friend request inventorystatic void
openHideInventory(org.bukkit.entity.Player pPlayer)
Opens the hide inventorystatic void
openMainInventory(org.bukkit.entity.Player pPlayer, int pPage)
Opens the main inventorystatic void
openPartyInventory(org.bukkit.entity.Player pPlayer, int pPage)
Opens the party inventorystatic void
openSettingsInventory(org.bukkit.entity.Player pPlayer)
Opens the settings inventorystatic 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.
-
-
-
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 openpPage
- 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 openpPage
- 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 reloadedpJoin
- 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 requestpRequested
- 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 requestpFriend
- 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 requesttoDeny
- 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 friendpFriend
- 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 friendpFriend
- 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 inviterpInvited
- 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 executedpPlayer
- The player who will be executing the command
-
sendMessage
public static void sendMessage(com.google.gson.JsonObject pJObj, org.bukkit.entity.Player pPlayer)
-
-