Interface Equippable
- All Superinterfaces:
BuildableDataComponent<Equippable,
Equippable.Builder>
@NullMarked
@Experimental
@NonExtendable
public interface Equippable
extends BuildableDataComponent<Equippable,Equippable.Builder>
Holds the equippable properties of an item.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the set of allowed entities that can equip this item.Gets the camera overlay key if present.boolean
Checks if the item takes damage when the wearer is hurt.boolean
Checks if the item is dispensable.static Equippable.Builder
equippable
(EquipmentSlot slot) Creates a newEquippable.Builder
instance.Gets the equip sound key.model()
Gets the model key if present.slot()
Gets the equipment slot this item can be equipped in.boolean
Checks if the item is swappable.Methods inherited from interface io.papermc.paper.datacomponent.BuildableDataComponent
toBuilder
-
Method Details
-
equippable
Creates a newEquippable.Builder
instance.- Parameters:
slot
- The slot for the new equippable to be equippable in.- Returns:
- a new builder
-
slot
Gets the equipment slot this item can be equipped in.- Returns:
- the equipment slot
-
equipSound
Gets the equip sound key.- Returns:
- the equip sound key
-
model
Gets the model key if present.- Returns:
- the model key or null
-
cameraOverlay
Gets the camera overlay key if present.- Returns:
- the camera overlay key or null
-
allowedEntities
Gets the set of allowed entities that can equip this item. May be null if all entities are allowed.- Returns:
- the set of allowed entities
-
dispensable
Checks if the item is dispensable.- Returns:
- true if dispensable, false otherwise
-
swappable
Checks if the item is swappable.- Returns:
- true if swappable, false otherwise
-
damageOnHurt
Checks if the item takes damage when the wearer is hurt.- Returns:
- true if it damages on hurt, false otherwise
-