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

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

    • GetBalance

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

    • getBalance

      public BigDecimal getBalance()
      Gets the current balance
      Returns:
      The current balance
    • setBalance

      public void setBalance(BigDecimal balance)
      Sets the value that will be returned
      Parameters:
      balance - The new balance value
    • isCancelable

      public boolean isCancelable()
      Overrides:
      isCancelable in class net.minecraftforge.eventbus.api.Event