Interface IVaultCompatibility


public interface IVaultCompatibility
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    depositBalance(org.bukkit.OfflinePlayer player, double amount)
    Gives the given amount of money to the player.
    double
    getBalance(org.bukkit.OfflinePlayer player)
    Gets the balance of the player.
    getGroup(org.bukkit.entity.Player player)
    Gets the primary/top group from the given player
    Gets all registered groups from the registered permission plugin.
    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 player
    getSuffix(org.bukkit.entity.Player player)
    Gets the suffix of the given player
    boolean
    hasBalance(org.bukkit.OfflinePlayer player, double amount)
    Determines if the player has amount balance in their account.
    void
    setBalance(org.bukkit.OfflinePlayer player, double balance)
    Sets the balance of a player utilizing withdraw and deposit methods.
    void
    withdrawBalance(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 of
      balance - The balance to set
    • hasBalance

      boolean hasBalance(org.bukkit.OfflinePlayer player, double amount)
      Determines if the player has amount balance 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 check
      amount - 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 from
      amount - 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 to
      amount - The amount of money to deposit
    • getPrefix

      String getPrefix(org.bukkit.entity.Player player)
      Gets the prefix of the given player
      Parameters:
      player - The player to get the prefix from
      Returns:
      The prefix of the player
    • getSuffix

      String getSuffix(org.bukkit.entity.Player player)
      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

      String[] getGroups(org.bukkit.entity.Player player)
      Gets all groups that the given player has.
      Parameters:
      player - The player to pull groups from
      Returns:
      The groups the player is in
    • getGroup

      String getGroup(org.bukkit.entity.Player player)
      Gets the primary/top group from the given player
      Parameters:
      player - The player to pull from
      Returns:
      The primary group of the player