mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 02:02:04 -07:00
Deprecate ArmorStand equipment methods in favour of the standard and more complete EntityEquipment methods
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.inventory.EntityEquipment;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.EulerAngle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -8,93 +9,118 @@ import org.jetbrains.annotations.Nullable;
|
||||
public interface ArmorStand extends LivingEntity {
|
||||
|
||||
/**
|
||||
* Returns the item the armor stand is
|
||||
* currently holding
|
||||
* Returns the item the armor stand is currently holding.
|
||||
*
|
||||
* @return the held item
|
||||
* @deprecated prefer {@link EntityEquipment#getItemInHand()}
|
||||
* @see #getEquipment()
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
ItemStack getItemInHand();
|
||||
|
||||
/**
|
||||
* Sets the item the armor stand is currently
|
||||
* holding
|
||||
* Sets the item the armor stand is currently holding.
|
||||
*
|
||||
* @param item the item to hold
|
||||
* @deprecated prefer
|
||||
* {@link EntityEquipment#setItemInHand(org.bukkit.inventory.ItemStack)}
|
||||
* @see #getEquipment()
|
||||
*/
|
||||
@Deprecated
|
||||
void setItemInHand(@Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Returns the item currently being worn
|
||||
* by the armor stand on its feet
|
||||
* Returns the item currently being worn by the armor stand on its feet.
|
||||
*
|
||||
* @return the worn item
|
||||
* @deprecated prefer {@link EntityEquipment#getBoots()}
|
||||
* @see #getEquipment()
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
ItemStack getBoots();
|
||||
|
||||
/**
|
||||
* Sets the item currently being worn
|
||||
* by the armor stand on its feet
|
||||
* Sets the item currently being worn by the armor stand on its feet.
|
||||
*
|
||||
* @param item the item to wear
|
||||
* @deprecated prefer
|
||||
* {@link EntityEquipment#setBoots(org.bukkit.inventory.ItemStack)}
|
||||
* @see #getEquipment()
|
||||
*/
|
||||
@Deprecated
|
||||
void setBoots(@Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Returns the item currently being worn
|
||||
* by the armor stand on its legs
|
||||
* Returns the item currently being worn by the armor stand on its legs.
|
||||
*
|
||||
* @return the worn item
|
||||
* @deprecated prefer {@link EntityEquipment#getLeggings()}
|
||||
* @see #getEquipment()
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
ItemStack getLeggings();
|
||||
|
||||
/**
|
||||
* Sets the item currently being worn
|
||||
* by the armor stand on its legs
|
||||
* Sets the item currently being worn by the armor stand on its legs.
|
||||
*
|
||||
* @param item the item to wear
|
||||
* @deprecated prefer
|
||||
* {@link EntityEquipment#setLeggings(org.bukkit.inventory.ItemStack)}
|
||||
* @see #getEquipment()
|
||||
*/
|
||||
@Deprecated
|
||||
void setLeggings(@Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Returns the item currently being worn
|
||||
* by the armor stand on its chest
|
||||
* Returns the item currently being worn by the armor stand on its chest.
|
||||
*
|
||||
* @return the worn item
|
||||
* @deprecated prefer {@link EntityEquipment#getChestplate()}
|
||||
* @see #getEquipment()
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
ItemStack getChestplate();
|
||||
|
||||
/**
|
||||
* Sets the item currently being worn
|
||||
* by the armor stand on its chest
|
||||
* Sets the item currently being worn by the armor stand on its chest.
|
||||
*
|
||||
* @param item the item to wear
|
||||
* @deprecated prefer
|
||||
* {@link EntityEquipment#setChestplate(org.bukkit.inventory.ItemStack)}
|
||||
* @see #getEquipment()
|
||||
*/
|
||||
@Deprecated
|
||||
void setChestplate(@Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Returns the item currently being worn
|
||||
* by the armor stand on its head
|
||||
* Returns the item currently being worn by the armor stand on its head.
|
||||
*
|
||||
* @return the worn item
|
||||
* @deprecated prefer {@link EntityEquipment#getHelmet()}
|
||||
* @see #getEquipment()
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
ItemStack getHelmet();
|
||||
|
||||
/**
|
||||
* Sets the item currently being worn
|
||||
* by the armor stand on its head
|
||||
* Sets the item currently being worn by the armor stand on its head.
|
||||
*
|
||||
* @param item the item to wear
|
||||
* @deprecated prefer
|
||||
* {@link EntityEquipment#setHelmet(org.bukkit.inventory.ItemStack)}
|
||||
* @see #getEquipment()
|
||||
*/
|
||||
@Deprecated
|
||||
void setHelmet(@Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Returns the armor stand's body's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Returns the armor stand's body's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @return the current pose
|
||||
*/
|
||||
@@ -102,16 +128,16 @@ public interface ArmorStand extends LivingEntity {
|
||||
EulerAngle getBodyPose();
|
||||
|
||||
/**
|
||||
* Sets the armor stand's body's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Sets the armor stand's body's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @param pose the current pose
|
||||
*/
|
||||
void setBodyPose(@NotNull EulerAngle pose);
|
||||
|
||||
/**
|
||||
* Returns the armor stand's left arm's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Returns the armor stand's left arm's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @return the current pose
|
||||
*/
|
||||
@@ -119,16 +145,16 @@ public interface ArmorStand extends LivingEntity {
|
||||
EulerAngle getLeftArmPose();
|
||||
|
||||
/**
|
||||
* Sets the armor stand's left arm's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Sets the armor stand's left arm's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @param pose the current pose
|
||||
*/
|
||||
void setLeftArmPose(@NotNull EulerAngle pose);
|
||||
|
||||
/**
|
||||
* Returns the armor stand's right arm's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Returns the armor stand's right arm's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @return the current pose
|
||||
*/
|
||||
@@ -136,16 +162,16 @@ public interface ArmorStand extends LivingEntity {
|
||||
EulerAngle getRightArmPose();
|
||||
|
||||
/**
|
||||
* Sets the armor stand's right arm's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Sets the armor stand's right arm's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @param pose the current pose
|
||||
*/
|
||||
void setRightArmPose(@NotNull EulerAngle pose);
|
||||
|
||||
/**
|
||||
* Returns the armor stand's left leg's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Returns the armor stand's left leg's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @return the current pose
|
||||
*/
|
||||
@@ -153,16 +179,16 @@ public interface ArmorStand extends LivingEntity {
|
||||
EulerAngle getLeftLegPose();
|
||||
|
||||
/**
|
||||
* Sets the armor stand's left leg's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Sets the armor stand's left leg's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @param pose the current pose
|
||||
*/
|
||||
void setLeftLegPose(@NotNull EulerAngle pose);
|
||||
|
||||
/**
|
||||
* Returns the armor stand's right leg's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Returns the armor stand's right leg's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @return the current pose
|
||||
*/
|
||||
@@ -170,16 +196,16 @@ public interface ArmorStand extends LivingEntity {
|
||||
EulerAngle getRightLegPose();
|
||||
|
||||
/**
|
||||
* Sets the armor stand's right leg's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Sets the armor stand's right leg's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @param pose the current pose
|
||||
*/
|
||||
void setRightLegPose(@NotNull EulerAngle pose);
|
||||
|
||||
/**
|
||||
* Returns the armor stand's head's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Returns the armor stand's head's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @return the current pose
|
||||
*/
|
||||
@@ -187,86 +213,80 @@ public interface ArmorStand extends LivingEntity {
|
||||
EulerAngle getHeadPose();
|
||||
|
||||
/**
|
||||
* Sets the armor stand's head's
|
||||
* current pose as a {@link org.bukkit.util.EulerAngle}
|
||||
* Sets the armor stand's head's current pose as a
|
||||
* {@link org.bukkit.util.EulerAngle}.
|
||||
*
|
||||
* @param pose the current pose
|
||||
*/
|
||||
void setHeadPose(@NotNull EulerAngle pose);
|
||||
|
||||
/**
|
||||
* Returns whether the armor stand has
|
||||
* a base plate
|
||||
* Returns whether the armor stand has a base plate.
|
||||
*
|
||||
* @return whether it has a base plate
|
||||
*/
|
||||
boolean hasBasePlate();
|
||||
|
||||
/**
|
||||
* Sets whether the armor stand has a
|
||||
* base plate
|
||||
* Sets whether the armor stand has a base plate.
|
||||
*
|
||||
* @param basePlate whether is has a base plate
|
||||
*/
|
||||
void setBasePlate(boolean basePlate);
|
||||
|
||||
/**
|
||||
* Returns whether the armor stand should be
|
||||
* visible or not
|
||||
* Returns whether the armor stand should be visible or not.
|
||||
*
|
||||
* @return whether the stand is visible or not
|
||||
*/
|
||||
boolean isVisible();
|
||||
|
||||
/**
|
||||
* Sets whether the armor stand should be
|
||||
* visible or not
|
||||
* Sets whether the armor stand should be visible or not.
|
||||
*
|
||||
* @param visible whether the stand is visible or not
|
||||
*/
|
||||
void setVisible(boolean visible);
|
||||
|
||||
/**
|
||||
* Returns whether this armor stand has arms
|
||||
* Returns whether this armor stand has arms.
|
||||
*
|
||||
* @return whether this has arms or not
|
||||
*/
|
||||
boolean hasArms();
|
||||
|
||||
/**
|
||||
* Sets whether this armor stand has arms
|
||||
* Sets whether this armor stand has arms.
|
||||
*
|
||||
* @param arms whether this has arms or not
|
||||
*/
|
||||
void setArms(boolean arms);
|
||||
|
||||
/**
|
||||
* Returns whether this armor stand is scaled
|
||||
* down
|
||||
* Returns whether this armor stand is scaled down.
|
||||
*
|
||||
* @return whether this is scaled down
|
||||
*/
|
||||
boolean isSmall();
|
||||
|
||||
/**
|
||||
* Sets whether this armor stand is scaled
|
||||
* down
|
||||
* Sets whether this armor stand is scaled down.
|
||||
*
|
||||
* @param small whether this is scaled down
|
||||
*/
|
||||
void setSmall(boolean small);
|
||||
|
||||
/**
|
||||
* Returns whether this armor stand is a marker,
|
||||
* meaning it has a very small collision box
|
||||
* Returns whether this armor stand is a marker, meaning it has a very small
|
||||
* collision box.
|
||||
*
|
||||
* @return whether this is a marker
|
||||
*/
|
||||
boolean isMarker();
|
||||
|
||||
/**
|
||||
* Sets whether this armor stand is a marker,
|
||||
* meaning it has a very small collision box
|
||||
* Sets whether this armor stand is a marker, meaning it has a very small
|
||||
* collision box.
|
||||
*
|
||||
* @param marker whether this is a marker
|
||||
*/
|
||||
|
Reference in New Issue
Block a user