Class DropItemEvent.Drop

All Implemented Interfaces:
ICancellableEcsEvent
Enclosing class:
DropItemEvent

public static final class DropItemEvent.Drop extends DropItemEvent
An event that is called when an entity is dropping an item from their inventory.

If cancelled, the item will not be dropped.

  • Constructor Details

    • Drop

      public Drop(@Nonnull ItemStack itemStack, float throwSpeed)
      Default Constructor for a DropItemEvent instance.
      Parameters:
      itemStack - The item stack being dropped.
      throwSpeed - The speed at which to throw the item.
  • Method Details

    • setThrowSpeed

      public void setThrowSpeed(float throwSpeed)
      Called to set the speed at which to throw the item.
      Parameters:
      throwSpeed - the speed at which to throw the item.
    • getThrowSpeed

      public float getThrowSpeed()
      Returns:
      the speed at which to throw the item.
    • setItemStack

      public void setItemStack(@Nonnull ItemStack itemStack)
      Called to set the item stack being dropped.
      Parameters:
      itemStack - the item stack being dropped.
    • getItemStack

      @Nonnull public ItemStack getItemStack()
      Returns:
      the item stack being dropped.