Class EconomyEvent.GetBalance
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.economy.EconomyEvent
com.pixelmonmod.pixelmon.api.economy.EconomyEvent.GetBalance
- Enclosing class:
- EconomyEvent
Event fired when getting the balance of the player through the default
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 provided-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.economy.EconomyEvent
EconomyEvent.GetBalance, EconomyEvent.PostTransaction, EconomyEvent.PreTransaction, EconomyEvent.SetBalance, EconomyEvent.TransactionType
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
ConstructorDescriptionGetBalance
(net.minecraft.server.level.ServerPlayer player, BankAccount bankAccount, BigDecimal balance) -
Method Summary
Modifier and TypeMethodDescriptionGets the current balanceboolean
void
setBalance
(BigDecimal balance) Sets the value that will be returnedMethods inherited from class com.pixelmonmod.pixelmon.api.economy.EconomyEvent
getAccount, getPlayer
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
GetBalance
public GetBalance(net.minecraft.server.level.ServerPlayer player, BankAccount bankAccount, BigDecimal balance)
-
-
Method Details
-
getBalance
Gets the current balance- Returns:
- The current balance
-
setBalance
Sets the value that will be returned- Parameters:
balance
- The new balance value
-
isCancelable
public boolean isCancelable()- Overrides:
isCancelable
in classnet.minecraftforge.eventbus.api.Event
-