Class ItemEatEvent

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

public class ItemEatEvent extends Object implements org.bukkit.event.Listener
Listener that handles player item consumption events for rare items.

When a player consumes a rare item, this plays the configured consume 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
    onPlayerItemConsume(org.bukkit.event.player.PlayerItemConsumeEvent event)
    Handles PlayerItemConsumeEvent: if the consumed item is a rare item, play its configured consume sound for the player.

    Methods inherited from class java.lang.Object

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

    • ItemEatEvent

      public ItemEatEvent()
  • Method Details

    • init

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

      public void onPlayerItemConsume(org.bukkit.event.player.PlayerItemConsumeEvent event)
      Handles PlayerItemConsumeEvent: if the consumed item is a rare item, play its configured consume sound for the player.
      Parameters:
      event - the player item consume event