Enum Class DropResult

java.lang.Object
java.lang.Enum<DropResult>
nl.pim16aap2.lightkeeper.protocol.DropResult
All Implemented Interfaces:
Serializable, Comparable<DropResult>, Constable

public enum DropResult extends Enum<DropResult>
Outcome of a main-hand item drop, distinguishing the two reasons a drop can fail to materialize.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A plugin cancelled the PlayerDropItemEvent: the item entity was removed again and the player's inventory is unchanged.
    The drop materialized: a PlayerDropItemEvent fired uncancelled, the item entity stays in the world, and one item was consumed from the player's main hand.
    The player had nothing in their main hand; no event was fired at all.
  • Method Summary

    Modifier and Type
    Method
    Description
    static DropResult
    Returns the enum constant of this class with the specified name.
    static DropResult[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • DROPPED

      public static final DropResult DROPPED
      The drop materialized: a PlayerDropItemEvent fired uncancelled, the item entity stays in the world, and one item was consumed from the player's main hand.
    • CANCELLED

      public static final DropResult CANCELLED
      A plugin cancelled the PlayerDropItemEvent: the item entity was removed again and the player's inventory is unchanged.
    • EMPTY_HAND

      public static final DropResult EMPTY_HAND
      The player had nothing in their main hand; no event was fired at all.
  • Method Details

    • values

      public static DropResult[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DropResult valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null