Interface PlayerPickupItemEvent

All Superinterfaces:
Cancellable, Event, PlayerEvent

public interface PlayerPickupItemEvent extends PlayerEvent, Cancellable
Fired when a player walks over an item on the ground and is about to pick it up.

Cancelling it leaves the item on the ground; the event fires again on the next attempt.

Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the item entity on the ground.
    Returns what goes into the inventory: the whole stack on the ground, or the part of it that fits; the rest stays on the ground.

    Methods inherited from interface Cancellable

    isCancelled, setCancelled

    Methods inherited from interface PlayerEvent

    player
  • Method Details

    • item

      ItemEntity item()
      Returns the item entity on the ground.
      Returns:
      the item entity on the ground
      Since:
      0.1.0
    • taken

      ItemStack taken()
      Returns what goes into the inventory: the whole stack on the ground, or the part of it that fits; the rest stays on the ground.
      Returns:
      what goes into the inventory: the whole stack on the ground, or the part of it that fits; the rest stays on the ground
      Since:
      0.1.0