Class EconomyEvent.SetBalance
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.economy.EconomyEvent
com.pixelmonmod.pixelmon.api.economy.EconomyEvent.SetBalance
- Enclosing class:
- EconomyEvent
Event fired when setting 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 setting 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
ConstructorDescriptionSetBalance
(net.minecraft.server.level.ServerPlayer player, BankAccount bankAccount, BigDecimal balance) -
Method Summary
Modifier and TypeMethodDescriptionThe new value of the player's balancevoid
setBalance
(BigDecimal balance) Sets the new value to be something elseMethods inherited from class com.pixelmonmod.pixelmon.api.economy.EconomyEvent
getAccount, getPlayer
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
SetBalance
public SetBalance(net.minecraft.server.level.ServerPlayer player, BankAccount bankAccount, BigDecimal balance)
-
-
Method Details
-
getBalance
The new value of the player's balance- Returns:
- The new value
-
setBalance
Sets the new value to be something else- Parameters:
balance
- The new value
-