Package org.bukkit.entity
Interface ArmorStand
- All Superinterfaces:
Attributable
,Audience
,CommandSender
,Damageable
,Entity
,HoverEventSource<HoverEvent.ShowEntity>
,LivingEntity
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,Pointered
,ProjectileSource
,ServerOperator
,Sound.Emitter
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Represents types of locking mechanisms for ArmorStand equipment.Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDisabledSlots
(@NotNull EquipmentSlot... slots) Disable specific slots, adding them to the currently disabled slots This makes it so a player is unable to interact with the Armor Stand to place, remove, or replace an item in the given slot(s) Note: Once a slot is disabled, the only way to get an item back it to break the armor stand.void
addEquipmentLock
(@NotNull EquipmentSlot slot, @NotNull ArmorStand.LockType lockType) Locks the equipment slot with the specifiedlocking mechanism
.boolean
canMove()
Tests if this armor stand can move.boolean
canTick()
Tests if this armor stand can tick.Returns the armor stand's body's current pose as aEulerAngle
.getBoots()
Deprecated.Deprecated.Get the list of disabled slotsGets the inventory with the equipment worn by the living entity.Returns the armor stand's head's current pose as aEulerAngle
.Deprecated.preferEntityEquipment.getHelmet()
getItem
(EquipmentSlot slot) Returns the item the armor stand has equip in the given equipment slotDeprecated.prefergetItem(EquipmentSlot)
// PaperReturns the armor stand's left arm's current pose as aEulerAngle
.Returns the armor stand's left leg's current pose as aEulerAngle
.Deprecated.Returns the armor stand's right arm's current pose as aEulerAngle
.Returns the armor stand's right leg's current pose as aEulerAngle
.boolean
hasArms()
Returns whether this armor stand has arms.boolean
Returns whether the armor stand has a base plate.boolean
hasEquipmentLock
(@NotNull EquipmentSlot slot, @NotNull ArmorStand.LockType lockType) Returns if the ArmorStand has the specifiedlocking mechanism
.boolean
isMarker()
Returns whether this armor stand is a marker, meaning it has a very small collision box.boolean
isSlotDisabled
(EquipmentSlot slot) Check if a specific slot is disabledboolean
isSmall()
Returns whether this armor stand is scaled down.boolean
Returns whether the armor stand should be visible or not.void
removeDisabledSlots
(@NotNull EquipmentSlot... slots) Remove the given slots from the disabled slots list, enabling them.void
removeEquipmentLock
(@NotNull EquipmentSlot slot, @NotNull ArmorStand.LockType lockType) Remove alocking mechanism
.void
setArms
(boolean arms) Sets whether this armor stand has arms.void
setBasePlate
(boolean basePlate) Sets whether the armor stand has a base plate.void
setBodyPose
(@NotNull EulerAngle pose) Sets the armor stand's body's current pose as aEulerAngle
.void
Deprecated.void
setCanMove
(boolean move) Sets if this armor stand can move.void
setCanTick
(boolean tick) Sets if this armor stand can tick.void
setChestplate
(@Nullable ItemStack item) Deprecated.void
setDisabledSlots
(@NotNull EquipmentSlot... slots) Set the disabled slots This makes it so a player is unable to interact with the Armor Stand to place, remove, or replace an item in the given slot(s) Note: Once a slot is disabled, the only way to get an item back it to break the armor stand.void
setHeadPose
(@NotNull EulerAngle pose) Sets the armor stand's head's current pose as aEulerAngle
.void
Deprecated.void
setItem
(EquipmentSlot slot, @Nullable ItemStack item) Sets the item the armor stand has equip in the given equipment slotvoid
setItemInHand
(@Nullable ItemStack item) Deprecated.prefersetItem(EquipmentSlot, ItemStack)
// Papervoid
setLeftArmPose
(@NotNull EulerAngle pose) Sets the armor stand's left arm's current pose as aEulerAngle
.void
setLeftLegPose
(@NotNull EulerAngle pose) Sets the armor stand's left leg's current pose as aEulerAngle
.void
setLeggings
(@Nullable ItemStack item) Deprecated.void
setMarker
(boolean marker) Sets whether this armor stand is a marker, meaning it has a very small collision box.void
Sets the armor stand's right arm's current pose as aEulerAngle
.void
Sets the armor stand's right leg's current pose as aEulerAngle
.void
setSmall
(boolean small) Sets whether this armor stand is scaled down.void
setVisible
(boolean visible) Sets whether the armor stand should be visible or not.Methods inherited from interface org.bukkit.attribute.Attributable
getAttribute, registerAttribute
Methods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSound
Methods inherited from interface org.bukkit.command.CommandSender
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage
Methods inherited from interface org.bukkit.entity.Damageable
damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealth
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getTicksLived, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isTicking, isValid, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
Methods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, clearActiveItem, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getBeeStingerCooldown, getBeeStingersInBody, getCanPickupItems, getCategory, getCollidableExemptions, getEyeHeight, getEyeHeight, getEyeLocation, getHandRaised, getHandRaisedTime, getHurtDirection, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isHandRaised, isInvisible, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setCanPickupItems, setCollidable, setGliding, setHurtDirection, setInvisible, setJumping, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, swingMainHand, swingOffHand
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomName
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
Methods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Method Details
-
getItemInHand
Deprecated.prefergetItem(EquipmentSlot)
// PaperReturns the item the armor stand is currently holding.- Returns:
- the held item
- See Also:
-
setItemInHand
Deprecated.prefersetItem(EquipmentSlot, ItemStack)
// PaperSets the item the armor stand is currently holding.- Parameters:
item
- the item to hold- See Also:
-
getBoots
Deprecated.preferEntityEquipment.getBoots()
Returns the item currently being worn by the armor stand on its feet.- Returns:
- the worn item
- See Also:
-
setBoots
Deprecated.Sets the item currently being worn by the armor stand on its feet.- Parameters:
item
- the item to wear- See Also:
-
getLeggings
Deprecated.Returns the item currently being worn by the armor stand on its legs.- Returns:
- the worn item
- See Also:
-
setLeggings
Deprecated.Sets the item currently being worn by the armor stand on its legs.- Parameters:
item
- the item to wear- See Also:
-
getChestplate
Deprecated.Returns the item currently being worn by the armor stand on its chest.- Returns:
- the worn item
- See Also:
-
setChestplate
Deprecated.Sets the item currently being worn by the armor stand on its chest.- Parameters:
item
- the item to wear- See Also:
-
getHelmet
Deprecated.preferEntityEquipment.getHelmet()
Returns the item currently being worn by the armor stand on its head.- Returns:
- the worn item
- See Also:
-
setHelmet
Deprecated.Sets the item currently being worn by the armor stand on its head.- Parameters:
item
- the item to wear- See Also:
-
getBodyPose
Returns the armor stand's body's current pose as aEulerAngle
.- Returns:
- the current pose
-
setBodyPose
Sets the armor stand's body's current pose as aEulerAngle
.- Parameters:
pose
- the current pose
-
getLeftArmPose
Returns the armor stand's left arm's current pose as aEulerAngle
.- Returns:
- the current pose
-
setLeftArmPose
Sets the armor stand's left arm's current pose as aEulerAngle
.- Parameters:
pose
- the current pose
-
getRightArmPose
Returns the armor stand's right arm's current pose as aEulerAngle
.- Returns:
- the current pose
-
setRightArmPose
Sets the armor stand's right arm's current pose as aEulerAngle
.- Parameters:
pose
- the current pose
-
getLeftLegPose
Returns the armor stand's left leg's current pose as aEulerAngle
.- Returns:
- the current pose
-
setLeftLegPose
Sets the armor stand's left leg's current pose as aEulerAngle
.- Parameters:
pose
- the current pose
-
getRightLegPose
Returns the armor stand's right leg's current pose as aEulerAngle
.- Returns:
- the current pose
-
setRightLegPose
Sets the armor stand's right leg's current pose as aEulerAngle
.- Parameters:
pose
- the current pose
-
getHeadPose
Returns the armor stand's head's current pose as aEulerAngle
.- Returns:
- the current pose
-
setHeadPose
Sets the armor stand's head's current pose as aEulerAngle
.- Parameters:
pose
- the current pose
-
hasBasePlate
boolean hasBasePlate()Returns whether the armor stand has a base plate.- Returns:
- whether it has a base plate
-
setBasePlate
void setBasePlate(boolean basePlate) Sets whether the armor stand has a base plate.- Parameters:
basePlate
- whether is has a base plate
-
isVisible
boolean isVisible()Returns whether the armor stand should be visible or not.- Returns:
- whether the stand is visible or not
-
setVisible
void setVisible(boolean visible) Sets whether the armor stand should be visible or not.- Parameters:
visible
- whether the stand is visible or not
-
hasArms
boolean hasArms()Returns whether this armor stand has arms.- Returns:
- whether this has arms or not
-
setArms
void setArms(boolean arms) Sets whether this armor stand has arms.- Parameters:
arms
- whether this has arms or not
-
isSmall
boolean isSmall()Returns whether this armor stand is scaled down.- Returns:
- whether this is scaled down
-
setSmall
void setSmall(boolean small) Sets whether this armor stand is scaled down.- Parameters:
small
- whether this is scaled down
-
isMarker
boolean isMarker()Returns whether this armor stand is a marker, meaning it has a very small collision box.- Returns:
- whether this is a marker
-
setMarker
void setMarker(boolean marker) Sets whether this armor stand is a marker, meaning it has a very small collision box.- Parameters:
marker
- whether this is a marker
-
addEquipmentLock
void addEquipmentLock(@NotNull @NotNull EquipmentSlot slot, @NotNull @NotNull ArmorStand.LockType lockType) Locks the equipment slot with the specifiedlocking mechanism
.- Parameters:
slot
- the equipment slot to locklockType
- the LockType to lock the equipment slot with
-
removeEquipmentLock
void removeEquipmentLock(@NotNull @NotNull EquipmentSlot slot, @NotNull @NotNull ArmorStand.LockType lockType) Remove alocking mechanism
.- Parameters:
slot
- the equipment slot to changelockType
- the LockType to remove
-
hasEquipmentLock
boolean hasEquipmentLock(@NotNull @NotNull EquipmentSlot slot, @NotNull @NotNull ArmorStand.LockType lockType) Returns if the ArmorStand has the specifiedlocking mechanism
.- Parameters:
slot
- the EquipmentSlot to testlockType
- the LockType to test- Returns:
- if the ArmorStand has been locked with the parameters specified
-
canMove
boolean canMove()Tests if this armor stand can move.The default value is
true
.- Returns:
true
if this armour stand can move,false
otherwise
-
setCanMove
void setCanMove(boolean move) Sets if this armor stand can move.- Parameters:
move
-true
if this armour stand can move,false
otherwise
-
getEquipment
@NotNull EntityEquipment getEquipment()Description copied from interface:LivingEntity
Gets the inventory with the equipment worn by the living entity.- Specified by:
getEquipment
in interfaceLivingEntity
- Returns:
- the living entity's inventory
-
canTick
boolean canTick()Tests if this armor stand can tick.The default value is defined in
paper.yml
.- Returns:
true
if this armour stand can tick,false
otherwise
-
setCanTick
void setCanTick(boolean tick) Sets if this armor stand can tick.- Parameters:
tick
-true
if this armour stand can tick,false
otherwise
-
getItem
Returns the item the armor stand has equip in the given equipment slot- Parameters:
slot
- the equipment slot to get- Returns:
- the ItemStack in the equipment slot
-
setItem
Sets the item the armor stand has equip in the given equipment slot- Parameters:
slot
- the equipment slot to setitem
- the item to hold
-
getDisabledSlots
Get the list of disabled slots- Returns:
- list of disabled slots
-
setDisabledSlots
Set the disabled slots This makes it so a player is unable to interact with the Armor Stand to place, remove, or replace an item in the given slot(s) Note: Once a slot is disabled, the only way to get an item back it to break the armor stand.- Parameters:
slots
- var-arg array of slots to lock
-
addDisabledSlots
Disable specific slots, adding them to the currently disabled slots This makes it so a player is unable to interact with the Armor Stand to place, remove, or replace an item in the given slot(s) Note: Once a slot is disabled, the only way to get an item back it to break the armor stand.- Parameters:
slots
- var-arg array of slots to lock
-
removeDisabledSlots
Remove the given slots from the disabled slots list, enabling them. This makes it so a player is able to interact with the Armor Stand to place, remove, or replace an item in the given slot(s)- Parameters:
slots
- var-arg array of slots to unlock
-
isSlotDisabled
Check if a specific slot is disabled- Parameters:
slot
- The slot to check- Returns:
true
if the slot is disabled, elsefalse
.
-
EntityEquipment.getBoots()