public class EconomyEvent
extends net.minecraftforge.eventbus.api.Event
Modifier and Type | Class and Description |
---|---|
static class |
EconomyEvent.GetBalance
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 |
EconomyEvent.PostTransaction
Event fired just after a transaction is applied to the
BankAccount |
static class |
EconomyEvent.PreTransaction
Event fired just before a transaction is applied to the
BankAccount
If cancelled the transaction will not take place |
static class |
EconomyEvent.SetBalance
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 class |
EconomyEvent.TransactionType
An enum representing the type of transaction
|
Constructor and Description |
---|
EconomyEvent(net.minecraft.entity.player.ServerPlayerEntity player,
BankAccount account) |
Modifier and Type | Method and Description |
---|---|
BankAccount |
getAccount()
Gets the bank account of the player involved in the transaction
|
net.minecraft.entity.player.ServerPlayerEntity |
getPlayer()
Gets the player involved in the economy transaction
|
public EconomyEvent(net.minecraft.entity.player.ServerPlayerEntity player, BankAccount account)
public net.minecraft.entity.player.ServerPlayerEntity getPlayer()
public BankAccount getAccount()