Class ACurrency
java.lang.Object
com.olziedev.playerauctions.api.expansion.PluginExpansion
com.olziedev.playerauctions.api.expansion.Expansion
com.olziedev.playerauctions.api.expansion.ACurrency
Represents an auction currency addon that can allow multiple currencies for the plugin.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents a bank provider that can be used to withdraw money from a bank account. -
Field Summary
Fields inherited from class com.olziedev.playerauctions.api.expansion.PluginExpansion
config, expansionConfig, file, integrated, plugin, registry, version
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
Deposit the amount into the players balance in this currency.abstract void
getBalance
(APlayer aPlayer, Consumer<Double> balanceConsumer) Retrieve the balance from a player in this currency.abstract String
Retrieve the currency name.abstract String
Retrieve the prefix for the currency.getCurrencyPrefix
(String amount) Retrieve the prefix for the currency with the replaced variable.abstract double
Retrieve the currency maximum price amount.abstract double
Retrieve the currency minimum bid amount.abstract double
Retrieve the currency minimum price amount.abstract double
Retrieve the currency minimum price amount.void
hasBalance
(APlayer aPlayer, double amount, Consumer<Boolean> hasConsumer) Retrieve if the player has the balance specified in this currency.abstract boolean
Retrieve if the currency allows doubles (decimals) or integers (whole).abstract void
Withdraw the amount from the players balance in this currency.
-
Constructor Details
-
ACurrency
public ACurrency()
-
-
Method Details
-
getCurrencyName
Retrieve the currency name.- Returns:
- The currency name from the configuration file that is used by players to determine the currency.
-
getCurrencyPrefix
Retrieve the prefix for the currency.- Returns:
- The currency prefix from the configuration file that is shown is used for the price variable.
-
getCurrencyPrefix
Retrieve the prefix for the currency with the replaced variable.- Parameters:
amount
- The formatted amount that is shown in the currency prefix.- Returns:
- The original currency prefix with the replaced variable as the specified amount.
-
getMinPricePurchaseAmount
public abstract double getMinPricePurchaseAmount()Retrieve the currency minimum price amount.- Returns:
- The currency minimum price amount for the confirmation GUI.
-
getMinPriceSellAmount
public abstract double getMinPriceSellAmount()Retrieve the currency minimum price amount.- Returns:
- The minimum price you can sell an item for.
-
getMaxPriceSellAmount
public abstract double getMaxPriceSellAmount()Retrieve the currency maximum price amount.- Returns:
- The maximum price you can sell an item for.
-
getMinPriceBidAmount
public abstract double getMinPriceBidAmount()Retrieve the currency minimum bid amount.- Returns:
- The minimum price you can bid for an item.
-
hasDecimalSupport
public abstract boolean hasDecimalSupport()Retrieve if the currency allows doubles (decimals) or integers (whole).- Returns:
- If the currency allows decimals or not.
-
hasBalance
Retrieve if the player has the balance specified in this currency.- Parameters:
aPlayer
- The player to that checks the balance for.amount
- The amount to check for.hasConsumer
- Callback If the player has the amount in this currency.
-
getBalance
Retrieve the balance from a player in this currency.- Parameters:
aPlayer
- The player to get the balance from.balanceConsumer
- Callback for getting the balance.
-
deposit
Deposit the amount into the players balance in this currency.- Parameters:
aPlayer
- The player that'll receive a deposit in this currency.amount
- The amount to give in this currency.
-
withdraw
Withdraw the amount from the players balance in this currency.- Parameters:
aPlayer
- The player to withdraw the currency from.amount
- The amount to take from this currency.
-