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
Modifier and TypeClassDescriptionstatic class
Event fired when getting the balance of the player through the defaultBankAccount
implementation (PlayerPartyStorage
) For any economy bridges, this event MUST be listened to and the balance MUST be assigned in case someone uses thePlayerPartyStorage
methods for getting the balance The methods inPlayerPartyStorage
exist for the case of single player or any instances where no otherBankAccount
implementation is providedstatic class
Event fired just after a transaction is applied to theBankAccount
static class
Event fired just before a transaction is applied to theBankAccount
If cancelled the transaction will not take placestatic class
Event fired when setting the balance of the player through the defaultBankAccount
implementation (PlayerPartyStorage
) For any economy bridges, this event MUST be listened to and the balance MUST be assigned in case someone uses thePlayerPartyStorage
methods for setting the balance The methods inPlayerPartyStorage
exist for the case of single player or any instances where no otherBankAccount
implementation is providedstatic enum
An enum representing the type of transactionNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
ConstructorDescriptionEconomyEvent
(net.minecraft.server.level.ServerPlayer player, BankAccount account) -
Method Summary
Modifier and TypeMethodDescriptionGets the bank account of the player involved in the transactionnet.minecraft.server.level.ServerPlayer
Gets the player involved in the economy transactionMethods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
EconomyEvent
-
-
Method Details
-
getPlayer
public net.minecraft.server.level.ServerPlayer getPlayer()Gets the player involved in the economy transaction- Returns:
- The player
-
getAccount
Gets the bank account of the player involved in the transaction- Returns:
- The bank account of the player
-