Class PlayerPurchaseProductEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
us.teaminceptus.novaconomy.api.events.player.economy.PlayerEconomyEvent
us.teaminceptus.novaconomy.api.events.player.economy.PlayerPurchaseProductEvent
Called after a Player purchases something
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerPurchaseProductEvent(@NotNull Player p, @NotNull BusinessProduct product, BusinessStatistics.Transaction transaction, int amount) Constructs a PlayerPurchaseProductEvent. -
Method Summary
Modifier and TypeMethodDescription@NotNull BusinessProductFetches the BusinessProduct involved in this event.intFetches the amount of the product purchased.Fetches the transaction involved in this event.Methods inherited from class us.teaminceptus.novaconomy.api.events.player.economy.PlayerEconomyEvent
getAmount, getEconomy, getHandlerList, getHandlersMethods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerPurchaseProductEvent
public PlayerPurchaseProductEvent(@NotNull @NotNull Player p, @NotNull @NotNull BusinessProduct product, @Nullable BusinessStatistics.Transaction transaction, int amount) Constructs a PlayerPurchaseProductEvent.- Parameters:
p- Player that purchased productproduct- BusinessProduct usedtransaction- The Transaction of the Purchaseamount- Amount of product purchased
-
-
Method Details
-
getProduct
Fetches the BusinessProduct involved in this event.- Returns:
- Product player bought
-
getPurchasedAmount
public int getPurchasedAmount()Fetches the amount of the product purchased.- Returns:
- Amount of product purchased
-
getTransaction
Fetches the transaction involved in this event.- Returns:
- Transaction of the purchase
-