Class EconomyEvent.SetBalance
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.economy.EconomyEvent
com.pixelmonmod.pixelmon.api.economy.EconomyEvent.SetBalance
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
EconomyEvent
public static class EconomyEvent.SetBalance
extends EconomyEvent
implements net.neoforged.bus.api.ICancellableEvent
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 -
Constructor Summary
ConstructorsConstructorDescriptionSetBalance(net.minecraft.server.level.ServerPlayer player, BankAccount bankAccount, BigDecimal balance) -
Method Summary
Modifier and TypeMethodDescriptionThe new value of the player's balancevoidsetBalance(BigDecimal balance) Sets the new value to be something elseMethods inherited from class com.pixelmonmod.pixelmon.api.economy.EconomyEvent
getAccount, getPlayerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
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
-