Class ItemPickupEvent

java.lang.Object
valorless.rarespawns.events.ItemPickupEvent
All Implemented Interfaces:
org.bukkit.event.Listener

public class ItemPickupEvent extends Object implements org.bukkit.event.Listener
Listener that handles entity item pickup events for rare items.

When an entity picks up a rare item, this plays the configured pickup sound (if any). Also provides a static init method to register this listener.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Registers this listener with the server's plugin manager.
    void
    onEntityPickupItem(org.bukkit.event.entity.EntityPickupItemEvent event)
    Handles EntityPickupItemEvent: if the picked up ItemStack is a rare item, play its configured pickup sound at the item's location.

    Methods inherited from class java.lang.Object

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

    • ItemPickupEvent

      public ItemPickupEvent()
  • Method Details

    • init

      public static void init()
      Registers this listener with the server's plugin manager.
    • onEntityPickupItem

      public void onEntityPickupItem(org.bukkit.event.entity.EntityPickupItemEvent event)
      Handles EntityPickupItemEvent: if the picked up ItemStack is a rare item, play its configured pickup sound at the item's location.
      Parameters:
      event - the entity pickup item event