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

public static class EconomyEvent.SetBalance extends 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
  • Constructor Details

    • SetBalance

      public SetBalance(net.minecraft.server.level.ServerPlayer player, BankAccount bankAccount, BigDecimal balance)
  • Method Details

    • getBalance

      public BigDecimal getBalance()
      The new value of the player's balance
      Returns:
      The new value
    • setBalance

      public void setBalance(BigDecimal balance)
      Sets the new value to be something else
      Parameters:
      balance - The new value