Class PickupItemEvent

java.lang.Object
net.minestom.server.event.item.PickupItemEvent
All Implemented Interfaces:
Event, CancellableEvent, EntityEvent, EntityInstanceEvent, InstanceEvent, ItemEvent

public class PickupItemEvent extends Object implements EntityInstanceEvent, ItemEvent, CancellableEvent
  • Constructor Details

    • PickupItemEvent

      public PickupItemEvent(@NotNull @NotNull LivingEntity livingEntity, @NotNull @NotNull ItemEntity itemEntity)
  • Method Details

    • getLivingEntity

      @NotNull public @NotNull LivingEntity getLivingEntity()
    • getItemEntity

      @NotNull public @NotNull ItemEntity getItemEntity()
    • getItemStack

      @NotNull public @NotNull ItemStack getItemStack()
      Specified by:
      getItemStack in interface ItemEvent
    • isCancelled

      public boolean isCancelled()
      Description copied from interface: CancellableEvent
      Gets if the Event should be cancelled or not.
      Specified by:
      isCancelled in interface CancellableEvent
      Returns:
      true if the event should be cancelled
    • setCancelled

      public void setCancelled(boolean cancel)
      Description copied from interface: CancellableEvent
      Marks the Event as cancelled or not.
      Specified by:
      setCancelled in interface CancellableEvent
      Parameters:
      cancel - true if the event should be cancelled, false otherwise
    • getEntity

      @NotNull public @NotNull Entity getEntity()
      Description copied from interface: EntityEvent
      Gets the entity of this event.
      Specified by:
      getEntity in interface EntityEvent
      Returns:
      the entity