Class EconomyEvent.PostTransaction
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.economy.EconomyEvent
com.pixelmonmod.pixelmon.api.economy.EconomyEvent.PostTransaction
- Enclosing class:
- EconomyEvent
Event fired just after a transaction is applied to the
BankAccount
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.economy.EconomyEvent
EconomyEvent.GetBalance, EconomyEvent.PostTransaction, EconomyEvent.PreTransaction, EconomyEvent.SetBalance, EconomyEvent.TransactionType
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
ConstructorDescriptionPostTransaction
(net.minecraft.server.level.ServerPlayer player, BankAccount bankAccount, EconomyEvent.TransactionType type, BigDecimal oldBalance, BigDecimal newBalance) -
Method Summary
Modifier and TypeMethodDescriptionCalculates the difference between the old and new balancesGets the value of the balance after the transactionGets the value of the balance before the transactiongetType()
Gets the type of transaction that occuredboolean
Methods inherited from class com.pixelmonmod.pixelmon.api.economy.EconomyEvent
getAccount, getPlayer
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
PostTransaction
public PostTransaction(net.minecraft.server.level.ServerPlayer player, BankAccount bankAccount, EconomyEvent.TransactionType type, BigDecimal oldBalance, BigDecimal newBalance)
-
-
Method Details
-
getType
Gets the type of transaction that occured- Returns:
- The type of transaction
-
getOldBalance
Gets the value of the balance before the transaction- Returns:
- The old balance
-
getNewBalance
Gets the value of the balance after the transaction- Returns:
- The new balance
-
getDifference
Calculates the difference between the old and new balances- Returns:
- The difference
-
isCancelable
public boolean isCancelable()- Overrides:
isCancelable
in classnet.minecraftforge.eventbus.api.Event
-