Class EconomyEvent
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.economy.EconomyEvent
- Direct Known Subclasses:
EconomyEvent.GetBalance,EconomyEvent.PostTransaction,EconomyEvent.PreTransaction,EconomyEvent.SetBalance
public class EconomyEvent
extends net.neoforged.bus.api.Event
Superclass of all events relating to the economy
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEvent fired when getting the balance of the player through the defaultBankAccountimplementation (PlayerPartyStorage) For any economy bridges, this event MUST be listened to and the balance MUST be assigned in case someone uses thePlayerPartyStoragemethods for getting the balance The methods inPlayerPartyStorageexist for the case of single player or any instances where no otherBankAccountimplementation is providedstatic classEvent fired just after a transaction is applied to theBankAccountstatic classEvent fired just before a transaction is applied to theBankAccountIf cancelled the transaction will not take placestatic classEvent fired when setting the balance of the player through the defaultBankAccountimplementation (PlayerPartyStorage) For any economy bridges, this event MUST be listened to and the balance MUST be assigned in case someone uses thePlayerPartyStoragemethods for setting the balance The methods inPlayerPartyStorageexist for the case of single player or any instances where no otherBankAccountimplementation is providedstatic enumAn enum representing the type of transaction -
Constructor Summary
ConstructorsConstructorDescriptionEconomyEvent(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.ServerPlayerGets the player involved in the economy transaction
-
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
-