Class EconomyEvent.PostTransaction
java.lang.Object
net.neoforged.bus.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
-
Constructor Summary
ConstructorsConstructorDescriptionPostTransaction
(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 occuredMethods inherited from class com.pixelmonmod.pixelmon.api.economy.EconomyEvent
getAccount, getPlayer
-
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
-