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

    Constructors
    Constructor
    Description
    LootPopulateEvent​(Structure structure, org.bukkit.Location location, LootTable lootTable)
    Construct the loot populate event.
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LootPopulateEvent

      public LootPopulateEvent(Structure structure, org.bukkit.Location location, LootTable lootTable)
      Construct the loot populate event.
      Parameters:
      structure - The structure.
      location - The location.
      lootTable - The loot table.
  • Method Details

    • getStructure

      public Structure getStructure()
      Get the structure that spawned.
      Returns:
      The structure that spawned.
    • getLootTable

      public LootTable 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 class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()