Enum Class PlayerBundleItemSelectEvent.Direction
java.lang.Object
java.lang.Enum<PlayerBundleItemSelectEvent.Direction>
io.papermc.paper.event.inventory.PlayerBundleItemSelectEvent.Direction
- All Implemented Interfaces:
Serializable, Comparable<PlayerBundleItemSelectEvent.Direction>, Constable
- Enclosing class:
PlayerBundleItemSelectEvent
public static enum PlayerBundleItemSelectEvent.Direction
extends Enum<PlayerBundleItemSelectEvent.Direction>
Represents a selection direction.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionflip()Returns the direction opposite to this direction.getDelta()Returns the delta integer of the direction.Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FORWARD
Represents forward direction. -
BACKWARD
Represents backward direction. -
UNKNOWN
Represents indeterminable direction.That is, for bundles with less than three item stacks inside.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getDelta
Returns the delta integer of the direction.Directions are mapped the following:
FORWARDto+1BACKWARDto-1UNKNOWNtoOptionalInt.empty()
- Returns:
- the delta
-
flip
Returns the direction opposite to this direction.- Returns:
- the flipped direction or
UNKNOWNif the direction is unknown
-