Package com.ryandw11.structure.api
Class LootPopulateEvent
java.lang.Object
org.bukkit.event.Event
com.ryandw11.structure.api.LootPopulateEvent
public class LootPopulateEvent
extends org.bukkit.event.Event
This event is called just before a container is populated with a loot table.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionLootPopulateEvent(Structure structure, org.bukkit.Location location, LootTable lootTable)
Construct the loot populate event. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
@NotNull org.bukkit.event.HandlerList
org.bukkit.Location
Get the location of the container.Get the selected loot table for the container.Get the structure that spawned.boolean
Get if the event is canceled.void
setCanceled(boolean canceled)
Set if the event is canceled.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
LootPopulateEvent
Construct the loot populate event.- Parameters:
structure
- The structure.location
- The location.lootTable
- The loot table.
-
-
Method Details
-
getStructure
Get the structure that spawned.- Returns:
- The structure that spawned.
-
getLootTable
Get the selected loot table for the container.- Returns:
- The selected loot table for the container.
-
getLocation
public org.bukkit.Location getLocation()Get the location of the container.- Returns:
- The location of the container.
-
setCanceled
public void setCanceled(boolean canceled)Set if the event is canceled.- Parameters:
canceled
- If the event is canceled.
-
isCanceled
public boolean isCanceled()Get if the event is canceled.- Returns:
- if the event is canceled.
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-