Class EconomyHook

java.lang.Object
us.talabrek.ultimateskyblock.hook.PluginHook
us.talabrek.ultimateskyblock.hook.economy.EconomyHook
Direct Known Subclasses:
VaultEconomy

public abstract class EconomyHook extends PluginHook
  • Constructor Summary

    Constructors
    Constructor
    Description
    EconomyHook(@NotNull uSkyBlock plugin, @NotNull String implementing)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract boolean
    depositPlayer(@NotNull org.bukkit.OfflinePlayer player, double amount)
    Deposit an amount to an OfflinePlayer - DO NOT USE NEGATIVE AMOUNTS
    abstract double
    getBalance(@NotNull org.bukkit.OfflinePlayer player)
    Gets balance of an OfflinePlayer
    @NotNull String
    Returns the icon or name of the currency in plural form.
    abstract boolean
    withdrawPlayer(@NotNull org.bukkit.OfflinePlayer player, double amount)
    Withdraw an amount from an OfflinePlayer - DO NOT USE NEGATIVE AMOUNTS

    Methods inherited from class us.talabrek.ultimateskyblock.hook.PluginHook

    getHookName, getImplementing, onHook, onUnhook

    Methods inherited from class java.lang.Object

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

    • EconomyHook

      public EconomyHook(@NotNull @NotNull uSkyBlock plugin, @NotNull @NotNull String implementing)
  • Method Details

    • getBalance

      public abstract double getBalance(@NotNull @NotNull org.bukkit.OfflinePlayer player)
      Gets balance of an OfflinePlayer
      Parameters:
      player - of the player
      Returns:
      Amount currently held in players account
    • depositPlayer

      public abstract boolean depositPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer player, double amount)
      Deposit an amount to an OfflinePlayer - DO NOT USE NEGATIVE AMOUNTS
      Parameters:
      player - to deposit to
      amount - Amount to deposit
      Returns:
      Detailed response of transaction
    • withdrawPlayer

      public abstract boolean withdrawPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer player, double amount)
      Withdraw an amount from an OfflinePlayer - DO NOT USE NEGATIVE AMOUNTS
      Parameters:
      player - to withdraw from
      amount - Amount to withdraw
      Returns:
      Detailed response of transaction
    • getCurrenyName

      @NotNull public @NotNull String getCurrenyName()
      Returns the icon or name of the currency in plural form. Defaults to $.
      Returns:
      icon or of the currency