Package org.bukkit.entity
Interface ArmorStand
- All Superinterfaces:
Attributable
,Audience
,CommandSender
,Damageable
,Entity
,Frictional
,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
.Returns the ArmorStand's body rotations asRotations
.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
.Returns the ArmorStand's head rotations asRotations
.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 ArmorStand's left arm rotations asRotations
.Returns the armor stand's left leg's current pose as aEulerAngle
.Returns the ArmorStand's left leg rotations asRotations
.Deprecated.Returns the armor stand's right arm's current pose as aEulerAngle
.Returns the ArmorStand's right arm rotations asRotations
.Returns the armor stand's right leg's current pose as aEulerAngle
.Returns the ArmorStand's right leg rotations asRotations
.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
setBodyRotations
(Rotations rotations) Sets the ArmorStand's body rotations asRotations
.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
setHeadRotations
(Rotations rotations) Sets the ArmorStand's head rotations asRotations
.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
setLeftArmRotations
(Rotations rotations) Sets the ArmorStand's left arm rotations asRotations
.void
setLeftLegPose
(@NotNull EulerAngle pose) Sets the armor stand's left leg's current pose as aEulerAngle
.void
setLeftLegRotations
(Rotations rotations) Sets the ArmorStand's left leg rotations asRotations
.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
setRightArmRotations
(Rotations rotations) Sets the ArmorStand's right arm rotations asRotations
.void
Sets the armor stand's right leg's current pose as aEulerAngle
.void
setRightLegRotations
(Rotations rotations) Sets the ArmorStand's right leg rotations asRotations
.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, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, 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, sendPlainMessage, sendRichMessage
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, collidesAt, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScheduler, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, 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, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, wouldCollideUsing
Methods inherited from interface io.papermc.paper.entity.Frictional
getFrictionState, setFrictionState
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
Methods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, broadcastSlotBreak, broadcastSlotBreak, canBreatheUnderwater, clearActiveItem, damageItemStack, damageItemStack, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getBeeStingerCooldown, getBeeStingersInBody, getBodyYaw, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getHandRaised, getHandRaisedTime, getHurtDirection, getHurtSound, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isHandRaised, isInvisible, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, knockback, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, rayTraceEntities, rayTraceEntities, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setBodyYaw, setCanPickupItems, setCollidable, setGliding, setHurtDirection, setInvisible, setJumping, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, swingHand, 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, 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
.
-
getBodyRotations
Returns the ArmorStand's body rotations asRotations
.- Returns:
- the current rotations
-
setBodyRotations
Sets the ArmorStand's body rotations asRotations
.- Parameters:
rotations
- the current rotations
-
getLeftArmRotations
Returns the ArmorStand's left arm rotations asRotations
.- Returns:
- the current rotations
-
setLeftArmRotations
Sets the ArmorStand's left arm rotations asRotations
.- Parameters:
rotations
- the current rotations
-
getRightArmRotations
Returns the ArmorStand's right arm rotations asRotations
.- Returns:
- the current rotations
-
setRightArmRotations
Sets the ArmorStand's right arm rotations asRotations
.- Parameters:
rotations
- the current rotations
-
getLeftLegRotations
Returns the ArmorStand's left leg rotations asRotations
.- Returns:
- the current rotations
-
setLeftLegRotations
Sets the ArmorStand's left leg rotations asRotations
.- Parameters:
rotations
- the current rotations
-
getRightLegRotations
Returns the ArmorStand's right leg rotations asRotations
.- Returns:
- the current rotations
-
setRightLegRotations
Sets the ArmorStand's right leg rotations asRotations
.- Parameters:
rotations
- the current rotations
-
getHeadRotations
Returns the ArmorStand's head rotations asRotations
.- Returns:
- the current rotations
-
setHeadRotations
Sets the ArmorStand's head rotations asRotations
.- Parameters:
rotations
- the current rotations
-
EntityEquipment.getBoots()