public static class EconomyEvent.GetBalance extends EconomyEvent
BankAccount
implementation (PlayerPartyStorage
)
For any economy bridges, this event MUST be listened to and the balance MUST be assigned in case someone uses the
PlayerPartyStorage
methods for getting the balance
The methods in PlayerPartyStorage
exist for the case of single player
or any instances where no other BankAccount
implementation is providedEconomyEvent.GetBalance, EconomyEvent.PostTransaction, EconomyEvent.PreTransaction, EconomyEvent.SetBalance, EconomyEvent.TransactionType
Constructor and Description |
---|
GetBalance(net.minecraft.entity.player.ServerPlayerEntity player,
BankAccount bankAccount,
java.math.BigDecimal balance) |
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
getBalance()
Gets the current balance
|
boolean |
isCancelable() |
void |
setBalance(java.math.BigDecimal balance)
Sets the value that will be returned
|
getAccount, getPlayer
public GetBalance(net.minecraft.entity.player.ServerPlayerEntity player, BankAccount bankAccount, java.math.BigDecimal balance)
public java.math.BigDecimal getBalance()
public void setBalance(java.math.BigDecimal balance)
balance
- The new balance valuepublic boolean isCancelable()
isCancelable
in class net.minecraftforge.eventbus.api.Event