Update to Minecraft 1.8

For more information please see http://www.spigotmc.org/

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2014-11-26 08:15:59 +11:00
parent 84fc1478c5
commit 8344aacc6e
29 changed files with 1184 additions and 87 deletions

View File

@@ -0,0 +1,261 @@
package org.bukkit.entity;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.EulerAngle;
public interface ArmorStand extends LivingEntity {
/**
* Returns the item the armor stand is
* currently holding
*
* @return the held item
*/
ItemStack getItemInHand();
/**
* Sets the item the armor stand is currently
* holding
*
* @param item the item to hold
*/
void setItemInHand(ItemStack item);
/**
* Returns the item currently being worn
* by the armor stand on its feet
*
* @return the worn item
*/
ItemStack getBoots();
/**
* Sets the item currently being worn
* by the armor stand on its feet
*
* @param item the item to wear
*/
void setBoots(ItemStack item);
/**
* Returns the item currently being worn
* by the armor stand on its legs
*
* @return the worn item
*/
ItemStack getLeggings();
/**
* Sets the item currently being worn
* by the armor stand on its legs
*
* @param item the item to wear
*/
void setLeggings(ItemStack item);
/**
* Returns the item currently being worn
* by the armor stand on its chest
*
* @return the worn item
*/
ItemStack getChestplate();
/**
* Sets the item currently being worn
* by the armor stand on its chest
*
* @param item the item to wear
*/
void setChestplate(ItemStack item);
/**
* Returns the item currently being worn
* by the armor stand on its head
*
* @return the worn item
*/
ItemStack getHelmet();
/**
* Sets the item currently being worn
* by the armor stand on its head
*
* @param item the item to wear
*/
void setHelmet(ItemStack item);
/**
* Returns the armor stand's body's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @return the current pose
*/
EulerAngle getBodyPose();
/**
* Sets the armor stand's body's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @param pose the current pose
*/
void setBodyPose(EulerAngle pose);
/**
* Returns the armor stand's left arm's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @return the current pose
*/
EulerAngle getLeftArmPose();
/**
* Sets the armor stand's left arm's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @param pose the current pose
*/
void setLeftArmPose(EulerAngle pose);
/**
* Returns the armor stand's right arm's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @return the current pose
*/
EulerAngle getRightArmPose();
/**
* Sets the armor stand's right arm's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @param pose the current pose
*/
void setRightArmPose(EulerAngle pose);
/**
* Returns the armor stand's left leg's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @return the current pose
*/
EulerAngle getLeftLegPose();
/**
* Sets the armor stand's left leg's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @param pose the current pose
*/
void setLeftLegPose(EulerAngle pose);
/**
* Returns the armor stand's right leg's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @return the current pose
*/
EulerAngle getRightLegPose();
/**
* Sets the armor stand's right leg's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @param pose the current pose
*/
void setRightLegPose(EulerAngle pose);
/**
* Returns the armor stand's head's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @return the current pose
*/
EulerAngle getHeadPose();
/**
* Sets the armor stand's head's
* current pose as a {@link org.bukkit.util.EulerAngle}
*
* @param pose the current pose
*/
void setHeadPose(EulerAngle pose);
/**
* 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
*
* @param basePlate whether is has a base plate
*/
void setBasePlate(boolean basePlate);
/**
* Returns whether gravity applies to
* this armor stand
*
* @return whether gravity applies
*/
boolean hasGravity();
/**
* Sets whether gravity applies to
* this armor stand
*
* @param gravity whether gravity should apply
*/
void setGravity(boolean gravity);
/**
* 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
*
* @param visible whether the stand is visible or not
*/
void setVisible(boolean visible);
/**
* Returns whether this armor stand has arms
*
* @return whether this has arms or not
*/
boolean hasArms();
/**
* 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
*
* @return whether this is scaled down
*/
boolean isSmall();
/**
* Sets whether this armor stand is scaled
* down
*
* @param small whether this is scaled down
*/
void setSmall(boolean small);
}

View File

@@ -26,6 +26,8 @@ public enum CreatureType {
BLAZE("Blaze", Blaze.class, 61),
MAGMA_CUBE("LavaSlime", MagmaCube.class, 62),
ENDER_DRAGON("EnderDragon", EnderDragon.class, 63),
ENDERMITE("Endermite", Endermite.class, 67),
GUARDIAN("Guardian", Guardian.class, 68),
PIG("Pig", Pig.class, 90),
SHEEP("Sheep", Sheep.class, 91),
COW("Cow", Cow.class, 92),
@@ -34,6 +36,7 @@ public enum CreatureType {
WOLF("Wolf", Wolf.class, 95),
MUSHROOM_COW("MushroomCow", MushroomCow.class, 96),
SNOWMAN("SnowMan", Snowman.class, 97),
RABBIT("Rabbit", Rabbit.class, 101),
VILLAGER("Villager", Villager.class, 120);
private String name;

View File

@@ -0,0 +1,4 @@
package org.bukkit.entity;
public interface Endermite extends Monster {
}

View File

@@ -295,4 +295,49 @@ public interface Entity extends Metadatable {
* @return The current vehicle.
*/
public Entity getVehicle();
/**
* Sets a custom name on a mob. This name will be used in death messages
* and can be sent to the client as a nameplate over the mob.
* <p>
* Setting the name to null or an empty string will clear it.
* <p>
* This value has no effect on players, they will always use their real
* name.
*
* @param name the name to set
*/
public void setCustomName(String name);
/**
* Gets the custom name on a mob. If there is no name this method will
* return null.
* <p>
* This value has no effect on players, they will always use their real
* name.
*
* @return name of the mob or null
*/
public String getCustomName();
/**
* Sets whether or not to display the mob's custom name client side. The
* name will be displayed above the mob similarly to a player.
* <p>
* This value has no effect on players, they will always display their
* name.
*
* @param flag custom name or not
*/
public void setCustomNameVisible(boolean flag);
/**
* Gets whether or not the mob's custom name is displayed client side.
* <p>
* This value has no effect on players, they will always display their
* name.
*
* @return if the custom name is displayed
*/
public boolean isCustomNameVisible();
}

View File

@@ -81,6 +81,7 @@ public enum EntityType {
*/
FALLING_BLOCK("FallingSand", FallingBlock.class, 21, false),
FIREWORK("FireworksRocketEntity", Firework.class, 22, false),
ARMOR_STAND("ArmorStand", ArmorStand.class, 30, false),
/**
* @see CommandMinecart
*/
@@ -130,6 +131,8 @@ public enum EntityType {
WITHER("WitherBoss", Wither.class, 64),
BAT("Bat", Bat.class, 65),
WITCH("Witch", Witch.class, 66),
ENDERMITE("Endermite", Endermite.class, 67),
GUARDIAN("Guardian", Guardian.class, 68),
PIG("Pig", Pig.class, 90),
SHEEP("Sheep", Sheep.class, 91),
COW("Cow", Cow.class, 92),
@@ -141,6 +144,7 @@ public enum EntityType {
OCELOT("Ozelot", Ocelot.class, 98),
IRON_GOLEM("VillagerGolem", IronGolem.class, 99),
HORSE("EntityHorse", Horse.class, 100),
RABBIT("Rabbit", Rabbit.class, 101),
VILLAGER("Villager", Villager.class, 120),
ENDER_CRYSTAL("EnderCrystal", EnderCrystal.class, 200),
// These don't have an entity ID in nms.EntityTypes.

View File

@@ -0,0 +1,4 @@
package org.bukkit.entity;
public interface Guardian extends Monster {
}

View File

@@ -320,51 +320,6 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource {
*/
public boolean getCanPickupItems();
/**
* Sets a custom name on a mob. This name will be used in death messages
* and can be sent to the client as a nameplate over the mob.
* <p>
* Setting the name to null or an empty string will clear it.
* <p>
* This value has no effect on players, they will always use their real
* name.
*
* @param name the name to set
*/
public void setCustomName(String name);
/**
* Gets the custom name on a mob. If there is no name this method will
* return null.
* <p>
* This value has no effect on players, they will always use their real
* name.
*
* @return name of the mob or null
*/
public String getCustomName();
/**
* Sets whether or not to display the mob's custom name client side. The
* name will be displayed above the mob similarly to a player.
* <p>
* This value has no effect on players, they will always display their
* name.
*
* @param flag custom name or not
*/
public void setCustomNameVisible(boolean flag);
/**
* Gets whether or not the mob's custom name is displayed client side.
* <p>
* This value has no effect on players, they will always display their
* name.
*
* @return if the custom name is displayed
*/
public boolean isCustomNameVisible();
/**
* Returns whether the entity is currently leashed.
*

View File

@@ -0,0 +1,4 @@
package org.bukkit.entity;
public interface Rabbit extends Animals {
}

View File

@@ -3,4 +3,4 @@ package org.bukkit.entity;
/**
* Represents a Water Mob
*/
public interface WaterMob extends Creature {}
public interface WaterMob extends LivingEntity {}