Class SimpleVaultEconomy

java.lang.Object
wtf.choco.veinminer.economy.SimpleVaultEconomy
All Implemented Interfaces:
SimpleEconomy

public class SimpleVaultEconomy extends Object implements SimpleEconomy
An implementation of SimpleEconomy to make use of a Vault-supported economy plugin.
  • Constructor Details

    • SimpleVaultEconomy

      public SimpleVaultEconomy()
  • Method Details

    • shouldCharge

      public boolean shouldCharge(@NotNull @NotNull PlatformPlayer player)
      Description copied from interface: SimpleEconomy
      Check whether the provided player should have money withdrawn from their account before vein mining.
      Specified by:
      shouldCharge in interface SimpleEconomy
      Parameters:
      player - the player to check
      Returns:
      true if money should be withdrawn, false otherwise
    • hasSufficientBalance

      public boolean hasSufficientBalance(@NotNull @NotNull PlatformPlayer player, double amount)
      Description copied from interface: SimpleEconomy
      Check whether or not the provided player has a sufficient amount of money to be charged.
      Specified by:
      hasSufficientBalance in interface SimpleEconomy
      Parameters:
      player - the the player to check
      amount - the amount of money to withdraw
      Returns:
      true if the player has a sufficient amount of money, false otherwise
    • withdraw

      public void withdraw(@NotNull @NotNull PlatformPlayer player, double amount)
      Description copied from interface: SimpleEconomy
      Withdraw money from the specified player.
      Specified by:
      withdraw in interface SimpleEconomy
      Parameters:
      player - the player from whom money should be withdrawn
      amount - the amount of money to withdraw
    • hasEconomyPlugin

      public boolean hasEconomyPlugin()
      Check whether or not an economy implementation was found.
      Returns:
      true if economy is enabled, false otherwise