Package valorless.rarespawns.events
Class ItemPickupEvent
java.lang.Object
valorless.rarespawns.events.ItemPickupEvent
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinit()Registers this listener with the server's plugin manager.voidonEntityPickupItem(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.
-
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
-