Class EconomyEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.economy.EconomyEvent
Direct Known Subclasses:
EconomyEvent.GetBalance, EconomyEvent.PostTransaction, EconomyEvent.PreTransaction, EconomyEvent.SetBalance

public class EconomyEvent extends net.minecraftforge.eventbus.api.Event
Superclass of all events relating to the economy
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    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
    static class 
    Event fired just after a transaction is applied to the BankAccount
    static class 
    Event fired just before a transaction is applied to the BankAccount If cancelled the transaction will not take place
    static class 
    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
    static enum 
    An enum representing the type of transaction

    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

    Constructors
    Constructor
    Description
    EconomyEvent(net.minecraft.server.level.ServerPlayer player, BankAccount account)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the bank account of the player involved in the transaction
    net.minecraft.server.level.ServerPlayer
    Gets the player involved in the economy transaction

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EconomyEvent

      public EconomyEvent(net.minecraft.server.level.ServerPlayer player, BankAccount account)
  • Method Details

    • getPlayer

      public net.minecraft.server.level.ServerPlayer getPlayer()
      Gets the player involved in the economy transaction
      Returns:
      The player
    • getAccount

      public BankAccount getAccount()
      Gets the bank account of the player involved in the transaction
      Returns:
      The bank account of the player