Package com.yottabyte.crates.api.event
Class CrateOpenEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- org.bukkit.event.player.PlayerEvent
-
- com.yottabyte.crates.api.event.CrateOpenEvent
-
- Direct Known Subclasses:
PhysicalCrateOpenEvent
,VirtualCrateOpenEvent
public abstract class CrateOpenEvent extends org.bukkit.event.player.PlayerEvent
Event called after a crate is opened.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CrateOpenEvent(@NotNull org.bukkit.entity.Player who, @NotNull Crate crate, org.bukkit.block.Block block, @NotNull List<Reward> rewards)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bukkit.block.Block
getBlock()
Gets theBlock
that was clicked to open the crate.@NotNull Crate
getCrate()
Gets theCrate
that was opened.static @NotNull org.bukkit.event.HandlerList
getHandlerList()
@NotNull org.bukkit.event.HandlerList
getHandlers()
@NotNull List<Reward>
getRewards()
Gets the rewards that were won from the crate.
-
-
-
Method Detail
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getCrate
@NotNull public @NotNull Crate getCrate()
Gets theCrate
that was opened.- Returns:
- the
Crate
that was opened
-
getBlock
public org.bukkit.block.Block getBlock()
Gets theBlock
that was clicked to open the crate.- Returns:
- the
Block
that was clicked to open the crate
-
-