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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionGets the set of allowed entities that can equip this item.assetId()Gets the asset id if present.Gets the camera overlay key if present.booleanChecks if the item can be sheared off an entity.booleanChecks if the item takes damage when the wearer is hurt.booleanChecks if the item is dispensable.booleanChecks if the item should be equipped when interacting with an entity.static Equippable.Builderequippable(EquipmentSlot slot) Creates a newEquippable.Builderinstance.Gets the equip sound key.Returns the sound that is played when shearing this equipment off an entity.slot()Gets the equipment slot this item can be equipped in.booleanChecks if the item is swappable.Methods inherited from interface io.papermc.paper.datacomponent.BuildableDataComponent
toBuilder
-
Method Details
-
equippable
Creates a newEquippable.Builderinstance.- 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
-
assetId
Gets the asset id if present.- Returns:
- the asset id 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
-
equipOnInteract
Checks if the item should be equipped when interacting with an entity.- Returns:
- true if it equips on interact, false otherwise
-
canBeSheared
Checks if the item can be sheared off an entity.- Returns:
- true if can be sheared off an entity, false otherwise
-
shearSound
Returns the sound that is played when shearing this equipment off an entity.- Returns:
- shear sound
-