Class LootDropEvent

java.lang.Object
org.bukkit.event.Event
dev.aurelium.auraskills.api.event.loot.LootDropEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class LootDropEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called when AuraSkills drops extra loot from mechanics like Fishing, Luck, and custom loot tables.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    LootDropEvent(org.bukkit.entity.Player player, SkillsUser user, org.bukkit.inventory.ItemStack item, org.bukkit.Location location, LootDropEvent.Cause cause, boolean toInventory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the LootDropEvent.Cause that initiated the loot drop.
    static org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
     
    org.bukkit.inventory.ItemStack
    Gets the item that will be dropped by the event.
    org.bukkit.Location
    Gets the location that the item will be dropped at in the world.
    org.bukkit.entity.Player
    Gets the player that caused the loot drop.
    Gets the SkillsUser of the player that cause the loot drop.
    boolean
     
    boolean
    Gets whether the item will go directly into the player's inventory instead of being dropped in the world.
    void
    setCancelled(boolean cancelled)
     
    setItem(org.bukkit.inventory.ItemStack item)
    Sets the item dropped by the event.
    setLocation(org.bukkit.Location location)
    Sets the location in the world that the item should be dropped at.
    void
    setToInventory(boolean toInventory)
    Sets whether the drop should go directly to the player's inventory instead of being dropped in the world.

    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

    • LootDropEvent

      public LootDropEvent(org.bukkit.entity.Player player, SkillsUser user, org.bukkit.inventory.ItemStack item, org.bukkit.Location location, LootDropEvent.Cause cause, boolean toInventory)
  • Method Details

    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Gets the player that caused the loot drop.
      Returns:
      the player
    • getUser

      public SkillsUser getUser()
      Gets the SkillsUser of the player that cause the loot drop.
      Returns:
      the user
    • getItem

      public org.bukkit.inventory.ItemStack getItem()
      Gets the item that will be dropped by the event.
      Returns:
      the item
    • setItem

      public LootDropEvent setItem(org.bukkit.inventory.ItemStack item)
      Sets the item dropped by the event.
      Parameters:
      item - the item to be dropped
      Returns:
      the event
    • getLocation

      public org.bukkit.Location getLocation()
      Gets the location that the item will be dropped at in the world.
      Returns:
      the location
    • setLocation

      public LootDropEvent setLocation(org.bukkit.Location location)
      Sets the location in the world that the item should be dropped at.
      Parameters:
      location - the location to drop
      Returns:
      the event
    • getCause

      public LootDropEvent.Cause getCause()
      Gets the LootDropEvent.Cause that initiated the loot drop.
      Returns:
      the cause
    • isToInventory

      public boolean isToInventory()
      Gets whether the item will go directly into the player's inventory instead of being dropped in the world.
      Returns:
      whether the drop goes directly to the player's inventory
    • setToInventory

      public void setToInventory(boolean toInventory)
      Sets whether the drop should go directly to the player's inventory instead of being dropped in the world. If the player's inventory cannot fit the entire ItemStack, the rest will be dropped in the world.
      Parameters:
      toInventory - true to go to inventory, false if not
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • 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()