Class ShopBuyEvent
java.lang.Object
org.bukkit.event.Event
com.tomkeuper.bedwars.api.events.shop.ShopBuyEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class ShopBuyEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Represents an event triggered when a player buys items from the shop.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionShopBuyEvent(org.bukkit.entity.Player buyer, IArena arena, ICategoryContent categoryContent, IShopCache shopCache, int slot) Creates a new ShopBuyEvent. -
Method Summary
Modifier and TypeMethodDescriptiongetArena()org.bukkit.entity.PlayergetBuyer()static org.bukkit.event.HandlerListGets the handler list for this event.@NotNull org.bukkit.event.HandlerListintgetSlot()booleanvoidsetCancelled(boolean cancelled) voidsetShopCache(IShopCache shopCache) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
ShopBuyEvent
public ShopBuyEvent(org.bukkit.entity.Player buyer, IArena arena, ICategoryContent categoryContent, IShopCache shopCache, int slot) Creates a new ShopBuyEvent.- Parameters:
buyer- The player who made the purchase.arena- The arena where the purchase occurred.categoryContent- The category content from the shop where the purchase was made.shopCache- The cache that contains the items bought by the player.
-
-
Method Details
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Gets the handler list for this event.- Returns:
- The handler list.
-
getBuyer
public org.bukkit.entity.Player getBuyer() -
getArena
-
getCategoryContent
-
getSlot
public int getSlot() -
getShopCache
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setShopCache
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-