Class SpielerGegenstandKonsumierEreignis

java.lang.Object
de.eimmer.ereignis.Ereignis
de.eimmer.ereignis.spieler.SpielerEreignis
de.eimmer.ereignis.spieler.SpielerGegenstandKonsumierEreignis
All Implemented Interfaces:
Abbrechbar

public class SpielerGegenstandKonsumierEreignis extends SpielerEreignis implements Abbrechbar
This ereignis will fire when a spieler is finishing consuming an item (food, zaubertrank, milk bucket).
If the GegenstandsStapel is modified the server will use the effects of the new item and not remove the original one from the spieler's inventar.
If the ereignis is cancelled the effect will not be applied and the item will not be removed from the spieler's inventar.
  • Constructor Details

  • Method Details

    • getItem

      @NotNull public GegenstandsStapel getItem()
      Gets the item that is being consumed. Modifying the returned item will have no effect, you must use setItem(GegenstandsStapel) instead.
      Returns:
      an GegenstandsStapel for the item being consumed
    • setItem

      public void setItem(@Nullable GegenstandsStapel item)
      Set the item being consumed
      Parameters:
      item - the item being consumed
    • getHand

      @NotNull public AusstattungsSpalte getHand()
      Get the hand used to consume the item.
      Returns:
      the hand
    • isCancelled

      public boolean isCancelled()
      Description copied from interface: Abbrechbar
      Gets the cancellation state of this ereignis. A cancelled ereignis will not be executed in the server, but will still pass to other plugins
      Specified by:
      isCancelled in interface Abbrechbar
      Returns:
      true if this ereignis is cancelled
    • setCancelled

      public void setCancelled(boolean cancel)
      Description copied from interface: Abbrechbar
      Sets the cancellation state of this ereignis. A cancelled ereignis will not be executed in the server, but will still pass to other plugins.
      Specified by:
      setCancelled in interface Abbrechbar
      Parameters:
      cancel - true if you wish to cancel this ereignis
    • getHandlers

      @NotNull public HandhaberListe getHandlers()
      Specified by:
      getHandlers in class Ereignis
    • getHandlerList

      @NotNull public static HandhaberListe getHandlerList()