Class EconomyHook
java.lang.Object
us.talabrek.ultimateskyblock.hook.PluginHook
us.talabrek.ultimateskyblock.hook.economy.EconomyHook
- Direct Known Subclasses:
VaultEconomy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
depositPlayer
(@NotNull org.bukkit.OfflinePlayer player, double amount) Deposit an amount to anOfflinePlayer
- DO NOT USE NEGATIVE AMOUNTSabstract double
getBalance
(@NotNull org.bukkit.OfflinePlayer player) Gets balance of anOfflinePlayer
@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 anOfflinePlayer
- DO NOT USE NEGATIVE AMOUNTSMethods inherited from class us.talabrek.ultimateskyblock.hook.PluginHook
getHookName, getImplementing, onHook, onUnhook
-
Constructor Details
-
EconomyHook
-
-
Method Details
-
getBalance
public abstract double getBalance(@NotNull @NotNull org.bukkit.OfflinePlayer player) Gets balance of anOfflinePlayer
- 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 anOfflinePlayer
- DO NOT USE NEGATIVE AMOUNTS- Parameters:
player
- to deposit toamount
- 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 anOfflinePlayer
- DO NOT USE NEGATIVE AMOUNTS- Parameters:
player
- to withdraw fromamount
- Amount to withdraw- Returns:
- Detailed response of transaction
-
getCurrenyName
Returns the icon or name of the currency in plural form. Defaults to $.- Returns:
- icon or of the currency
-