Class VaultEconomy

java.lang.Object
ua.mcchickenstudio.opencreative.managers.economy.VaultEconomy
All Implemented Interfaces:
Economy, Manager

public final class VaultEconomy extends Object implements Economy
Implementation of Vault economy, the most used on servers.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    depositMoney(org.bukkit.OfflinePlayer offlinePlayer, Number money)
    Deposits money to player for some reason, examples: gets world liked, some player bought in his world.
    getBalance(org.bukkit.OfflinePlayer offlinePlayer)
    Returns an amount of money that player has currently on his balance.
    Returns name of manager, that will be displayed by request in the logs.
    void
    Initialization of manager.
    boolean
    Checks if manager is ready to work.
    boolean
    withdrawMoney(org.bukkit.OfflinePlayer offlinePlayer, Number money)
    Takes money from player balance, examples: buys something in world.

    Methods inherited from class Object

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

    • VaultEconomy

      public VaultEconomy()
  • Method Details

    • depositMoney

      public boolean depositMoney(org.bukkit.OfflinePlayer offlinePlayer, Number money)
      Description copied from interface: Economy
      Deposits money to player for some reason, examples: gets world liked, some player bought in his world.
      Specified by:
      depositMoney in interface Economy
      Parameters:
      offlinePlayer - Player to give money.
      money - Amount of money to give.
      Returns:
      true - if successfully taken, false - failed.
    • withdrawMoney

      public boolean withdrawMoney(org.bukkit.OfflinePlayer offlinePlayer, Number money)
      Description copied from interface: Economy
      Takes money from player balance, examples: buys something in world.
      Specified by:
      withdrawMoney in interface Economy
      Parameters:
      offlinePlayer - Player to take his money.
      money - Amount of money to take.
      Returns:
      true - if successfully taken, false - failed.
    • getBalance

      public Number getBalance(org.bukkit.OfflinePlayer offlinePlayer)
      Description copied from interface: Economy
      Returns an amount of money that player has currently on his balance.
      Specified by:
      getBalance in interface Economy
      Parameters:
      offlinePlayer - Player to check balance.
      Returns:
      Amount of money on player's balance.
    • init

      public void init()
      Description copied from interface: Manager
      Initialization of manager.
      Specified by:
      init in interface Manager
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: Manager
      Checks if manager is ready to work.
      Specified by:
      isEnabled in interface Manager
      Returns:
      true - if enabled, false - disabled.
    • getName

      public String getName()
      Description copied from interface: Manager
      Returns name of manager, that will be displayed by request in the logs.
      Specified by:
      getName in interface Manager
      Returns:
      name of manager.