Enum HologramEquipment.Slot
- All Implemented Interfaces:
Serializable
,Comparable<HologramEquipment.Slot>
,java.lang.constant.Constable
- Enclosing interface:
HologramEquipment
Represents a slot in a holograms equipment inventory.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the 1.17+ NMS id that is being used for the given slot.int
Returns the 1.8 NMS id that is being used for the given slot.Returns the 1.9+ NMS id that is being used for the given slot.boolean
Returns whether the current spigot software supports the slot type.static HologramEquipment.Slot
Returns the enum constant of this type with the specified name.static HologramEquipment.Slot[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
HELMET
The head slot. -
CHESTPLATE
The breast slot. -
LEGGINGS
The legs slot. -
BOOTS
The feet slot. -
MAIN_HAND
Right hand. -
OFF_HAND
Left hand (1.9+ only).
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
isSupported
public boolean isSupported()Returns whether the current spigot software supports the slot type.E.g.
OFF_HAND
only is being supported on 1.9+. The method would returnfalse
on 1.8.8.- Returns:
true
when this slot may be used on the currently used spigot software
-
getInternalIdV8
public int getInternalIdV8()Returns the 1.8 NMS id that is being used for the given slot.There shouldn't be a use for this for most developers. Mainly used for internal purposes.
- Returns:
- The 1.8 NMS id for this slot
-
getInternalIdV9
Returns the 1.9+ NMS id that is being used for the given slot.There shouldn't be a use for this for most developers. Mainly used for internal purposes.
- Returns:
- The 1.9+ NMS id for this slot
-
getInternalIdV17
Returns the 1.17+ NMS id that is being used for the given slot.There shouldn't be a use for this for most developers. Mainly used for internal purposes.
- Returns:
- The 1.17+ NMS id for this slot
-