Interface SimpleEconomy

All Known Implementing Classes:
EmptyEconomy, SimpleVaultEconomy

public interface SimpleEconomy
A wrapper for economic transactions
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    hasSufficientBalance(@NotNull PlatformPlayer player, double amount)
    Check whether or not the provided player has a sufficient amount of money to be charged.
    boolean
    shouldCharge(@NotNull PlatformPlayer player)
    Check whether the provided player should have money withdrawn from their account before vein mining.
    void
    withdraw(@NotNull PlatformPlayer player, double amount)
    Withdraw money from the specified player.
  • Method Details

    • shouldCharge

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

      boolean hasSufficientBalance(@NotNull @NotNull PlatformPlayer player, double amount)
      Check whether or not the provided player has a sufficient amount of money to be charged.
      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

      void withdraw(@NotNull @NotNull PlatformPlayer player, double amount)
      Withdraw money from the specified player.
      Parameters:
      player - the player from whom money should be withdrawn
      amount - the amount of money to withdraw