Klasse EconomyGateway
java.lang.Object
de.delinkedde.areashopreborn.integration.EconomyGateway
Adapts the Vault economy provider to precise application-level amounts.
Vault ultimately uses doubles, so all responses are checked immediately.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic final classRepresents a failed external Vault operation. -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungEconomyGateway(net.milkbowl.vault.economy.Economy economy) Creates an economy gateway. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoiddeposit(org.bukkit.OfflinePlayer player, BigDecimal amount) Deposits funds and fails when Vault reports an unsuccessful response.format(BigDecimal amount) Formats an amount using the active economy provider.booleanhas(org.bukkit.OfflinePlayer player, BigDecimal amount) Checks whether an account can cover an amount.Returns the name of the economy implementation registered through Vault.voidwithdraw(org.bukkit.OfflinePlayer player, BigDecimal amount) Withdraws funds and fails when Vault reports an unsuccessful response.
-
Konstruktordetails
-
EconomyGateway
public EconomyGateway(net.milkbowl.vault.economy.Economy economy) Creates an economy gateway.- Parameter:
economy- active Vault economy provider
-
-
Methodendetails
-
has
Checks whether an account can cover an amount.- Parameter:
player- account owneramount- required amount- Gibt zurück:
truewhen sufficient funds are available
-
withdraw
Withdraws funds and fails when Vault reports an unsuccessful response.- Parameter:
player- account owneramount- amount to withdraw
-
deposit
Deposits funds and fails when Vault reports an unsuccessful response.- Parameter:
player- account owneramount- amount to deposit
-
format
Formats an amount using the active economy provider.- Parameter:
amount- amount to format- Gibt zurück:
- provider-formatted amount
-
providerName
Returns the name of the economy implementation registered through Vault.- Gibt zurück:
- provider name
-