接口 EquippableComponent
- 所有超级接口:
ConfigurationSerializable
Represents a component which can turn any item into equippable armor.
-
方法概要
修饰符和类型方法说明Gets the entities which can equip this item.Gets the key of the camera overlay to use when equipped.Gets the sound to play when the item is equipped.getModel()Gets the key of the model to use when equipped.Gets the sound to play when the item is sheared.getSlot()Gets the slot the item can be equipped to.booleanGets if the item will be sheared off by shears.booleanGets if the item will be damaged when the wearing entity is damaged.booleanGets whether the item can be equipped by a dispenser.booleanGets if the item will be equipped on interact.booleanGets if the item is swappable by right clicking.voidsetAllowedEntities(@Nullable Collection<EntityType> entities) Sets the entities which can equip this item.voidsetAllowedEntities(@Nullable EntityType entities) Sets the entities which can equip this item.voidSet the entity types (represented as an entityTag) which can equip this item.voidSets the key of the camera overlay to use when equipped.voidsetCanBeSheared(boolean sheared) Sets if the item will be sheared off by shears.voidsetDamageOnHurt(boolean damage) Sets if the item will be damaged when the wearing entity is damaged.voidsetDispensable(boolean dispensable) Sets whether the item can be equipped by a dispenser.voidsetEquipOnInteract(boolean equip) Sets if the item will be equipped on interact.voidsetEquipSound(@Nullable Sound sound) Sets the sound to play when the item is equipped.voidSets the key of the model to use when equipped.voidsetShearingSound(@Nullable Sound sound) Sets the sound to play when the item is sheared.voidsetSlot(@NotNull EquipmentSlot slot) Sets the slot the item can be equipped to.voidsetSwappable(boolean swappable) Sets if the item is swappable by right clicking.从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
-
方法详细资料
-
getSlot
Gets the slot the item can be equipped to.- 返回:
- slot
-
setSlot
Sets the slot the item can be equipped to.- 参数:
slot- new slot
-
getEquipSound
Gets the sound to play when the item is equipped.- 返回:
- the sound
-
setEquipSound
Sets the sound to play when the item is equipped.- 参数:
sound- sound or null for current default
-
getModel
Gets the key of the model to use when equipped.- 返回:
- model key
-
setModel
Sets the key of the model to use when equipped.- 参数:
key- model key
-
getCameraOverlay
Gets the key of the camera overlay to use when equipped.- 返回:
- camera overlay key
-
setCameraOverlay
Sets the key of the camera overlay to use when equipped.- 参数:
key- camera overlay key
-
getAllowedEntities
Gets the entities which can equip this item.- 返回:
- the entities
-
setAllowedEntities
Sets the entities which can equip this item.- 参数:
entities- the entity types
-
setAllowedEntities
Sets the entities which can equip this item.- 参数:
entities- the entity types
-
setAllowedEntities
Set the entity types (represented as an entityTag) which can equip this item.- 参数:
tag- the entity tag- 抛出:
IllegalArgumentException- if the passedtagis not an entity tag
-
isDispensable
boolean isDispensable()Gets whether the item can be equipped by a dispenser.- 返回:
- equippable status
-
setDispensable
void setDispensable(boolean dispensable) Sets whether the item can be equipped by a dispenser.- 参数:
dispensable- new equippable status
-
isSwappable
boolean isSwappable()Gets if the item is swappable by right clicking.- 返回:
- swappable status
-
setSwappable
void setSwappable(boolean swappable) Sets if the item is swappable by right clicking.- 参数:
swappable- new status
-
isDamageOnHurt
boolean isDamageOnHurt()Gets if the item will be damaged when the wearing entity is damaged.- 返回:
- whether the item will be damaged
-
setDamageOnHurt
void setDamageOnHurt(boolean damage) Sets if the item will be damaged when the wearing entity is damaged.- 参数:
damage- whether the item will be damaged
-
isEquipOnInteract
boolean isEquipOnInteract()Gets if the item will be equipped on interact.- 返回:
- whether the item will be equipped
-
setEquipOnInteract
void setEquipOnInteract(boolean equip) Sets if the item will be equipped on interact.- 参数:
equip- whether the item will be equipped
-
isCanBeSheared
boolean isCanBeSheared()Gets if the item will be sheared off by shears.- 返回:
- whether the item can be sheared off
-
setCanBeSheared
void setCanBeSheared(boolean sheared) Sets if the item will be sheared off by shears.- 参数:
sheared- whether the item can be sheared off
-
getShearingSound
Gets the sound to play when the item is sheared.- 返回:
- the sound
-
setShearingSound
Sets the sound to play when the item is sheared.- 参数:
sound- sound or null for current default
-