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