Interface IVaultCompatibility
public interface IVaultCompatibility
-
Method Summary
Modifier and TypeMethodDescriptionvoiddepositBalance(org.bukkit.OfflinePlayer player, double amount) Gives the given amount of money to the player.doublegetBalance(org.bukkit.OfflinePlayer player) Gets the balance of the player.getGroup(org.bukkit.entity.Player player) Gets the primary/top group from the given playerString[]Gets all registered groups from the registered permission plugin.String[]getGroups(org.bukkit.entity.Player player) Gets all groups that the given player has.getPrefix(org.bukkit.entity.Player player) Gets the prefix of the given playergetSuffix(org.bukkit.entity.Player player) Gets the suffix of the given playerbooleanhasBalance(org.bukkit.OfflinePlayer player, double amount) Determines if the player hasamountbalance in their account.voidsetBalance(org.bukkit.OfflinePlayer player, double balance) Sets the balance of a player utilizing withdraw and deposit methods.voidwithdrawBalance(org.bukkit.OfflinePlayer player, double amount) Withdraws the given amount of money from the player.
-
Method Details
-
getBalance
double getBalance(org.bukkit.OfflinePlayer player) Gets the balance of the player. If the player does not yet have an account, a new one is created. If vault is not installed, this method will return 0. Getting 0 does not mean that vault is not installed!- Parameters:
player- The player to get the balance of- Returns:
- The balance of the player
-
setBalance
void setBalance(org.bukkit.OfflinePlayer player, double balance) Sets the balance of a player utilizing withdraw and deposit methods. If the player does not yet have an account, a new one is created.- Parameters:
player- The player to set the balance ofbalance- The balance to set
-
hasBalance
boolean hasBalance(org.bukkit.OfflinePlayer player, double amount) Determines if the player hasamountbalance in their account. If the player does not yet have an account, this method will return false (No account is created)- Parameters:
player- The player to checkamount- The amount of money to check- Returns:
- If the player has enough money
-
withdrawBalance
void withdrawBalance(org.bukkit.OfflinePlayer player, double amount) Withdraws the given amount of money from the player. If the player does not have an account, a new one is created.- Parameters:
player- The player to take fromamount- The amount of money to take
-
depositBalance
void depositBalance(org.bukkit.OfflinePlayer player, double amount) Gives the given amount of money to the player. If the player does not have an account, a new one is created.- Parameters:
player- The player to give money toamount- The amount of money to deposit
-
getPrefix
Gets the prefix of the given player- Parameters:
player- The player to get the prefix from- Returns:
- The prefix of the player
-
getSuffix
Gets the suffix of the given player- Parameters:
player- The player to get the suffix from- Returns:
- The suffix of the player
-
getGroups
String[] getGroups()Gets all registered groups from the registered permission plugin. Useful for determining if player input for group is valid.- Returns:
- All registered groups
-
getGroups
Gets all groups that the given player has.- Parameters:
player- The player to pull groups from- Returns:
- The groups the player is in
-
getGroup
Gets the primary/top group from the given player- Parameters:
player- The player to pull from- Returns:
- The primary group of the player
-