13
0
geforkt von Mirrors/Paper

Update to Minecraft 1.11

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2016-11-17 12:40:59 +11:00
Ursprung 06e0085b98
Commit f1fb3d9462
59 geänderte Dateien mit 646 neuen und 682 gelöschten Zeilen

Datei anzeigen

@ -11,7 +11,7 @@
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId> <artifactId>bukkit</artifactId>
<version>1.10.2-R0.1-SNAPSHOT</version> <version>1.11-R0.1-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>Bukkit</name> <name>Bukkit</name>
@ -80,7 +80,7 @@
<dependency> <dependency>
<groupId>org.yaml</groupId> <groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId> <artifactId>snakeyaml</artifactId>
<version>1.15</version> <version>1.17</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- testing --> <!-- testing -->
@ -123,7 +123,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId> <artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.14</version> <version>1.15</version>
<executions> <executions>
<execution> <execution>
<phase>process-classes</phase> <phase>process-classes</phase>
@ -143,7 +143,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version> <version>2.4.3</version>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <phase>package</phase>

Datei anzeigen

@ -697,25 +697,6 @@ public final class Bukkit {
return server.isHardcore(); return server.isHardcore();
} }
/**
* Gets whether to use vanilla (false) or exact behaviour (true).
*
* <ul>
* <li>Vanilla behaviour: check for collisions and move the player if
* needed.
* <li>Exact behaviour: spawn players exactly where they should be.
* </ul>
*
* @return true if exact location locations are used for spawning, false
* for vanilla collision detection or otherwise
*
* @deprecated non standard and unused feature.
*/
@Deprecated
public static boolean useExactLoginLocation() {
return server.useExactLoginLocation();
}
/** /**
* Shutdowns the server, stopping everything. * Shutdowns the server, stopping everything.
*/ */

Datei anzeigen

@ -90,20 +90,6 @@ public enum DyeColor {
this.firework = firework; this.firework = firework;
} }
/**
* Gets the associated (wool) data value representing this color.
*
* @return A byte containing the (wool) data value of this color
* @deprecated The name is misleading. It would imply {@link
* Material#INK_SACK} but uses {@link Material#WOOL}
* @see #getWoolData()
* @see #getDyeData()
*/
@Deprecated
public byte getData() {
return getWoolData();
}
/** /**
* Gets the associated wool data value representing this color. * Gets the associated wool data value representing this color.
* *
@ -146,22 +132,6 @@ public enum DyeColor {
return firework; return firework;
} }
/**
* Gets the DyeColor with the given (wool) data value.
*
* @param data (wool) data value to fetch
* @return The {@link DyeColor} representing the given value, or null if
* it doesn't exist
* @deprecated The name is misleading. It would imply {@link
* Material#INK_SACK} but uses {@link Material#WOOL}
* @see #getByDyeData(byte)
* @see #getByWoolData(byte)
*/
@Deprecated
public static DyeColor getByData(final byte data) {
return getByWoolData(data);
}
/** /**
* Gets the DyeColor with the given wool data value. * Gets the DyeColor with the given wool data value.
* *

Datei anzeigen

@ -286,6 +286,23 @@ public enum Material {
RED_NETHER_BRICK(215), RED_NETHER_BRICK(215),
BONE_BLOCK(216), BONE_BLOCK(216),
STRUCTURE_VOID(217), STRUCTURE_VOID(217),
OBSERVER(218),
WHITE_SHULKER_BOX(219, 1),
ORANGE_SHULKER_BOX(220, 1),
MAGENTA_SHULKER_BOX(221, 1),
LIGHT_BLUE_SHULKER_BOX(222, 1),
YELLOW_SHULKER_BOX(223, 1),
LIME_SHULKER_BOX(224, 1),
PINK_SHULKER_BOX(225, 1),
GRAY_SHULKER_BOX(226, 1),
SILVER_SHULKER_BOX(227, 1),
CYAN_SHULKER_BOX(228, 1),
PURPLE_SHULKER_BOX(229, 1),
BLUE_SHULKER_BOX(230, 1),
BROWN_SHULKER_BOX(231, 1),
GREEN_SHULKER_BOX(232, 1),
RED_SHULKER_BOX(233, 1),
BLACK_SHULKER_BOX(234, 1),
STRUCTURE_BLOCK(255), STRUCTURE_BLOCK(255),
// ----- Item Separator ----- // ----- Item Separator -----
IRON_SPADE(256, 1, 250), IRON_SPADE(256, 1, 250),
@ -484,6 +501,8 @@ public enum Material {
BOAT_JUNGLE(446, 1), BOAT_JUNGLE(446, 1),
BOAT_ACACIA(447, 1), BOAT_ACACIA(447, 1),
BOAT_DARK_OAK(448, 1), BOAT_DARK_OAK(448, 1),
TOTEM(449, 1),
SHULKER_SHELL(450),
GOLD_RECORD(2256, 1), GOLD_RECORD(2256, 1),
GREEN_RECORD(2257, 1), GREEN_RECORD(2257, 1),
RECORD_3(2258, 1), RECORD_3(2258, 1),
@ -735,8 +754,7 @@ public enum Material {
} }
/** /**
* Check if the material is a block and solid (cannot be passed through by * Check if the material is a block and solid (can be built upon)
* a player)
* *
* @return True if this material is a block and solid * @return True if this material is a block and solid
*/ */
@ -909,6 +927,23 @@ public enum Material {
case NETHER_WART_BLOCK: case NETHER_WART_BLOCK:
case RED_NETHER_BRICK: case RED_NETHER_BRICK:
case BONE_BLOCK: case BONE_BLOCK:
case OBSERVER:
case WHITE_SHULKER_BOX:
case ORANGE_SHULKER_BOX:
case MAGENTA_SHULKER_BOX:
case LIGHT_BLUE_SHULKER_BOX:
case YELLOW_SHULKER_BOX:
case LIME_SHULKER_BOX:
case PINK_SHULKER_BOX:
case GRAY_SHULKER_BOX:
case SILVER_SHULKER_BOX:
case CYAN_SHULKER_BOX:
case PURPLE_SHULKER_BOX:
case BLUE_SHULKER_BOX:
case BROWN_SHULKER_BOX:
case GREEN_SHULKER_BOX:
case RED_SHULKER_BOX:
case BLACK_SHULKER_BOX:
return true; return true;
default: default:
return false; return false;

Datei anzeigen

@ -50,7 +50,9 @@ public enum Particle {
END_ROD, END_ROD,
DAMAGE_INDICATOR, DAMAGE_INDICATOR,
SWEEP_ATTACK, SWEEP_ATTACK,
FALLING_DUST(MaterialData.class); FALLING_DUST(MaterialData.class),
TOTEM,
SPIT;
private final Class<?> dataType; private final Class<?> dataType;

Datei anzeigen

@ -569,23 +569,6 @@ public interface Server extends PluginMessageRecipient {
*/ */
public boolean isHardcore(); public boolean isHardcore();
/**
* Gets whether to use vanilla (false) or exact behaviour (true).
*
* <ul>
* <li>Vanilla behaviour: check for collisions and move the player if
* needed.
* <li>Exact behaviour: spawn players exactly where they should be.
* </ul>
*
* @return true if exact location locations are used for spawning, false
* for vanilla collision detection or otherwise
*
* @deprecated non standard and unused feature.
*/
@Deprecated
public boolean useExactLoginLocation();
/** /**
* Shutdowns the server, stopping everything. * Shutdowns the server, stopping everything.
*/ */

Datei anzeigen

@ -5,8 +5,8 @@ package org.bukkit;
* <p> * <p>
* WARNING: At any time, sounds may be added/removed from this Enum or even * WARNING: At any time, sounds may be added/removed from this Enum or even
* MineCraft itself! There is no guarantee the sounds will play. There is no * MineCraft itself! There is no guarantee the sounds will play. There is no
* guarantee values will not be removed from this Enum. As such, you should * guarantee values will not be removed from this Enum. As such, you should not
* not depend on the ordinal values of this class. * depend on the ordinal values of this class.
*/ */
public enum Sound { public enum Sound {
AMBIENT_CAVE, AMBIENT_CAVE,
@ -94,6 +94,8 @@ public enum Sound {
BLOCK_SAND_HIT, BLOCK_SAND_HIT,
BLOCK_SAND_PLACE, BLOCK_SAND_PLACE,
BLOCK_SAND_STEP, BLOCK_SAND_STEP,
BLOCK_SHULKER_BOX_CLOSE,
BLOCK_SHULKER_BOX_OPEN,
BLOCK_SLIME_BREAK, BLOCK_SLIME_BREAK,
BLOCK_SLIME_FALL, BLOCK_SLIME_FALL,
BLOCK_SLIME_HIT, BLOCK_SLIME_HIT,
@ -182,6 +184,7 @@ public enum Sound {
ENTITY_ELDER_GUARDIAN_CURSE, ENTITY_ELDER_GUARDIAN_CURSE,
ENTITY_ELDER_GUARDIAN_DEATH, ENTITY_ELDER_GUARDIAN_DEATH,
ENTITY_ELDER_GUARDIAN_DEATH_LAND, ENTITY_ELDER_GUARDIAN_DEATH_LAND,
ENTITY_ELDER_GUARDIAN_FLOP,
ENTITY_ELDER_GUARDIAN_HURT, ENTITY_ELDER_GUARDIAN_HURT,
ENTITY_ELDER_GUARDIAN_HURT_LAND, ENTITY_ELDER_GUARDIAN_HURT_LAND,
ENTITY_ENDERDRAGON_AMBIENT, ENTITY_ENDERDRAGON_AMBIENT,
@ -203,9 +206,16 @@ public enum Sound {
ENTITY_ENDERMITE_HURT, ENTITY_ENDERMITE_HURT,
ENTITY_ENDERMITE_STEP, ENTITY_ENDERMITE_STEP,
ENTITY_ENDERPEARL_THROW, ENTITY_ENDERPEARL_THROW,
ENTITY_EVOCATION_FANGS_ATTACK,
ENTITY_EVOCATION_ILLAGER_AMBIENT,
ENTITY_EVOCATION_ILLAGER_CAST_SPELL,
ENTITY_EVOCATION_ILLAGER_DEATH,
ENTITY_EVOCATION_ILLAGER_HURT,
ENTITY_EVOCATION_ILLAGER_PREPARE_ATTACK,
ENTITY_EVOCATION_ILLAGER_PREPARE_SUMMON,
ENTITY_EVOCATION_ILLAGER_PREPARE_WOLOLO,
ENTITY_EXPERIENCE_BOTTLE_THROW, ENTITY_EXPERIENCE_BOTTLE_THROW,
ENTITY_EXPERIENCE_ORB_PICKUP, ENTITY_EXPERIENCE_ORB_PICKUP,
ENTITY_EXPERIENCE_ORB_TOUCH,
ENTITY_FIREWORK_BLAST, ENTITY_FIREWORK_BLAST,
ENTITY_FIREWORK_BLAST_FAR, ENTITY_FIREWORK_BLAST_FAR,
ENTITY_FIREWORK_LARGE_BLAST, ENTITY_FIREWORK_LARGE_BLAST,
@ -278,6 +288,15 @@ public enum Sound {
ENTITY_LIGHTNING_IMPACT, ENTITY_LIGHTNING_IMPACT,
ENTITY_LIGHTNING_THUNDER, ENTITY_LIGHTNING_THUNDER,
ENTITY_LINGERINGPOTION_THROW, ENTITY_LINGERINGPOTION_THROW,
ENTITY_LLAMA_AMBIENT,
ENTITY_LLAMA_ANGRY,
ENTITY_LLAMA_CHEST,
ENTITY_LLAMA_DEATH,
ENTITY_LLAMA_EAT,
ENTITY_LLAMA_HURT,
ENTITY_LLAMA_SPIT,
ENTITY_LLAMA_STEP,
ENTITY_LLAMA_SWAG,
ENTITY_MAGMACUBE_DEATH, ENTITY_MAGMACUBE_DEATH,
ENTITY_MAGMACUBE_HURT, ENTITY_MAGMACUBE_HURT,
ENTITY_MAGMACUBE_JUMP, ENTITY_MAGMACUBE_JUMP,
@ -286,6 +305,7 @@ public enum Sound {
ENTITY_MINECART_RIDING, ENTITY_MINECART_RIDING,
ENTITY_MOOSHROOM_SHEAR, ENTITY_MOOSHROOM_SHEAR,
ENTITY_MULE_AMBIENT, ENTITY_MULE_AMBIENT,
ENTITY_MULE_CHEST,
ENTITY_MULE_DEATH, ENTITY_MULE_DEATH,
ENTITY_MULE_HURT, ENTITY_MULE_HURT,
ENTITY_PAINTING_BREAK, ENTITY_PAINTING_BREAK,
@ -379,12 +399,19 @@ public enum Sound {
ENTITY_STRAY_HURT, ENTITY_STRAY_HURT,
ENTITY_STRAY_STEP, ENTITY_STRAY_STEP,
ENTITY_TNT_PRIMED, ENTITY_TNT_PRIMED,
ENTITY_VEX_AMBIENT,
ENTITY_VEX_CHARGE,
ENTITY_VEX_DEATH,
ENTITY_VEX_HURT,
ENTITY_VILLAGER_AMBIENT, ENTITY_VILLAGER_AMBIENT,
ENTITY_VILLAGER_DEATH, ENTITY_VILLAGER_DEATH,
ENTITY_VILLAGER_HURT, ENTITY_VILLAGER_HURT,
ENTITY_VILLAGER_NO, ENTITY_VILLAGER_NO,
ENTITY_VILLAGER_TRADING, ENTITY_VILLAGER_TRADING,
ENTITY_VILLAGER_YES, ENTITY_VILLAGER_YES,
ENTITY_VINDICATION_ILLAGER_AMBIENT,
ENTITY_VINDICATION_ILLAGER_DEATH,
ENTITY_VINDICATION_ILLAGER_HURT,
ENTITY_WITCH_AMBIENT, ENTITY_WITCH_AMBIENT,
ENTITY_WITCH_DEATH, ENTITY_WITCH_DEATH,
ENTITY_WITCH_DRINK, ENTITY_WITCH_DRINK,
@ -432,10 +459,12 @@ public enum Sound {
ENTITY_ZOMBIE_VILLAGER_STEP, ENTITY_ZOMBIE_VILLAGER_STEP,
ITEM_ARMOR_EQUIP_CHAIN, ITEM_ARMOR_EQUIP_CHAIN,
ITEM_ARMOR_EQUIP_DIAMOND, ITEM_ARMOR_EQUIP_DIAMOND,
ITEM_ARMOR_EQUIP_ELYTRA,
ITEM_ARMOR_EQUIP_GENERIC, ITEM_ARMOR_EQUIP_GENERIC,
ITEM_ARMOR_EQUIP_GOLD, ITEM_ARMOR_EQUIP_GOLD,
ITEM_ARMOR_EQUIP_IRON, ITEM_ARMOR_EQUIP_IRON,
ITEM_ARMOR_EQUIP_LEATHER, ITEM_ARMOR_EQUIP_LEATHER,
ITEM_BOTTLE_EMPTY,
ITEM_BOTTLE_FILL, ITEM_BOTTLE_FILL,
ITEM_BOTTLE_FILL_DRAGONBREATH, ITEM_BOTTLE_FILL_DRAGONBREATH,
ITEM_BUCKET_EMPTY, ITEM_BUCKET_EMPTY,
@ -450,6 +479,7 @@ public enum Sound {
ITEM_SHIELD_BLOCK, ITEM_SHIELD_BLOCK,
ITEM_SHIELD_BREAK, ITEM_SHIELD_BREAK,
ITEM_SHOVEL_FLATTEN, ITEM_SHOVEL_FLATTEN,
ITEM_TOTEM_USE,
MUSIC_CREATIVE, MUSIC_CREATIVE,
MUSIC_CREDITS, MUSIC_CREDITS,
MUSIC_DRAGON, MUSIC_DRAGON,

Datei anzeigen

@ -61,7 +61,8 @@ public enum Statistic {
FURNACE_INTERACTION, FURNACE_INTERACTION,
CRAFTING_TABLE_INTERACTION, CRAFTING_TABLE_INTERACTION,
CHEST_OPENED, CHEST_OPENED,
SLEEP_IN_BED; SLEEP_IN_BED,
SHULKER_BOX_OPENED;
private final Type type; private final Type type;

Datei anzeigen

@ -0,0 +1,8 @@
package org.bukkit.block;
import org.bukkit.inventory.InventoryHolder;
/**
* Represents a ShulkerBox.
*/
public interface ShulkerBox extends BlockState, InventoryHolder, Lockable { }

Datei anzeigen

@ -57,21 +57,6 @@ public abstract class Command {
*/ */
public abstract boolean execute(CommandSender sender, String commandLabel, String[] args); public abstract boolean execute(CommandSender sender, String commandLabel, String[] args);
/**
* Executed on tab completion for this command, returning a list of
* options the player can tab through.
*
* @deprecated This method is not supported and returns null
* @param sender Source object which is executing this command
* @param args All arguments passed to the command, split via ' '
* @return a list of tab-completions for the specified arguments. This
* will never be null. List may be immutable.
*/
@Deprecated
public List<String> tabComplete(CommandSender sender, String[] args) {
return null;
}
/** /**
* Executed on tab completion for this command, returning a list of * Executed on tab completion for this command, returning a list of
* options the player can tab through. * options the player can tab through.

Datei anzeigen

@ -1,16 +0,0 @@
package org.bukkit.command;
import java.util.List;
/**
* Represents a class which can handle command tab completion and commands
*
* @deprecated Remains for plugins that would have implemented it even without
* functionality
* @see TabExecutor
*/
@Deprecated
public interface TabCommandExecutor extends CommandExecutor {
public List<String> onTabComplete();
}

Datei anzeigen

@ -60,6 +60,11 @@ public abstract class Enchantment {
*/ */
public static final Enchantment FROST_WALKER = new EnchantmentWrapper(9); public static final Enchantment FROST_WALKER = new EnchantmentWrapper(9);
/**
* Item cannot be removed
*/
public static final Enchantment BINDING_CURSE = new EnchantmentWrapper(10);
/** /**
* Increases damage against all targets * Increases damage against all targets
*/ */
@ -146,6 +151,11 @@ public abstract class Enchantment {
*/ */
public static final Enchantment MENDING = new EnchantmentWrapper(70); public static final Enchantment MENDING = new EnchantmentWrapper(70);
/**
* Item disappears instead of dropping
*/
public static final Enchantment VANISHING_CURSE = new EnchantmentWrapper(71);
private static final Map<Integer, Enchantment> byId = new HashMap<Integer, Enchantment>(); private static final Map<Integer, Enchantment> byId = new HashMap<Integer, Enchantment>();
private static final Map<String, Enchantment> byName = new HashMap<String, Enchantment>(); private static final Map<String, Enchantment> byName = new HashMap<String, Enchantment>();
private static boolean acceptingNew = true; private static boolean acceptingNew = true;

Datei anzeigen

@ -0,0 +1,99 @@
package org.bukkit.entity;
import org.bukkit.inventory.InventoryHolder;
/**
* Represents a Horse-like creature.
*/
public interface AbstractHorse extends Animals, Vehicle, InventoryHolder, Tameable {
/**
* Gets the horse's variant.
* <p>
* A horse's variant defines its physical appearance and capabilities.
* Whether a horse is a regular horse, donkey, mule, or other kind of horse
* is determined using the variant.
*
* @return a {@link Variant} representing the horse's variant
* @deprecated different variants are different classes
*/
@Deprecated
public Horse.Variant getVariant();
/**
* @param variant
* @deprecated you are required to spawn a different entity
*/
@Deprecated
public void setVariant(Horse.Variant variant);
/**
* Gets the domestication level of this horse.
* <p>
* A higher domestication level indicates that the horse is closer to
* becoming tame. As the domestication level gets closer to the max
* domestication level, the chance of the horse becoming tame increases.
*
* @return domestication level
*/
public int getDomestication();
/**
* Sets the domestication level of this horse.
* <p>
* Setting the domestication level to a high value will increase the
* horse's chances of becoming tame.
* <p>
* Domestication level must be greater than zero and no greater than
* the max domestication level of the horse, determined with
* {@link #getMaxDomestication()}
*
* @param level domestication level
*/
public void setDomestication(int level);
/**
* Gets the maximum domestication level of this horse.
* <p>
* The higher this level is, the longer it will likely take
* for the horse to be tamed.
*
* @return the max domestication level
*/
public int getMaxDomestication();
/**
* Sets the maximum domestication level of this horse.
* <p>
* Setting a higher max domestication will increase the amount of
* domesticating (feeding, riding, etc.) necessary in order to tame it,
* while setting a lower max value will have the opposite effect.
* <p>
* Maximum domestication must be greater than zero.
*
* @param level the max domestication level
*/
public void setMaxDomestication(int level);
/**
* Gets the jump strength of this horse.
* <p>
* Jump strength defines how high the horse can jump. A higher jump strength
* increases how high a jump will go.
*
* @return the horse's jump strength
*/
public double getJumpStrength();
/**
* Sets the jump strength of this horse.
* <p>
* A higher jump strength increases how high a jump will go.
* Setting a jump strength to 0 will result in no jump.
* You cannot set a jump strength to a value below 0 or
* above 2.
*
* @param strength jump strength for this horse
*/
public void setJumpStrength(double strength);
}

Datei anzeigen

@ -0,0 +1,22 @@
package org.bukkit.entity;
/**
* Represents Horse-like creatures which can carry an inventory.
*/
public interface ChestedHorse extends AbstractHorse {
/**
* Gets whether the horse has a chest equipped.
*
* @return true if the horse has chest storage
*/
public boolean isCarryingChest();
/**
* Sets whether the horse has a chest equipped. Removing a chest will also
* clear the chest's inventory.
*
* @param chest true if the horse should have a chest
*/
public void setCarryingChest(boolean chest);
}

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents a Donkey - variant of {@link ChestedHorse}.
*/
public interface Donkey extends ChestedHorse { }

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents an ElderGuardian - variant of {@link Guardian}.
*/
public interface ElderGuardian extends Guardian { }

Datei anzeigen

@ -24,172 +24,225 @@ public enum EntityType {
* Spawn with {@link World#dropItem(Location, ItemStack)} or {@link * Spawn with {@link World#dropItem(Location, ItemStack)} or {@link
* World#dropItemNaturally(Location, ItemStack)} * World#dropItemNaturally(Location, ItemStack)}
*/ */
DROPPED_ITEM("Item", Item.class, 1, false), DROPPED_ITEM("item", Item.class, 1, false),
/** /**
* An experience orb. * An experience orb.
*/ */
EXPERIENCE_ORB("XPOrb", ExperienceOrb.class, 2), EXPERIENCE_ORB("xp_orb", ExperienceOrb.class, 2),
/**
* @see AreaEffectCloud
*/
AREA_EFFECT_CLOUD("area_effect_cloud", AreaEffectCloud.class, 3),
/**
* @see ElderGuardian
*/
ELDER_GUARDIAN("elder_guardian", ElderGuardian.class, 4),
/**
* @see WitherSkull
*/
WITHER_SKELETON("wither_skeleton", WitherSkeleton.class, 5),
/**
* @See Stray
*/
STRAY("stray", Stray.class, 6),
/**
* A flying chicken egg.
*/
EGG("egg", Egg.class, 7),
/** /**
* A leash attached to a fencepost. * A leash attached to a fencepost.
*/ */
LEASH_HITCH("LeashKnot", LeashHitch.class, 8), LEASH_HITCH("leash_knot", LeashHitch.class, 8),
/** /**
* A painting on a wall. * A painting on a wall.
*/ */
PAINTING("Painting", Painting.class, 9), PAINTING("painting", Painting.class, 9),
/** /**
* An arrow projectile; may get stuck in the ground. * An arrow projectile; may get stuck in the ground.
*/ */
ARROW("Arrow", Arrow.class, 10), ARROW("arrow", Arrow.class, 10),
/** /**
* A flying snowball. * A flying snowball.
*/ */
SNOWBALL("Snowball", Snowball.class, 11), SNOWBALL("snowball", Snowball.class, 11),
/** /**
* A flying large fireball, as thrown by a Ghast for example. * A flying large fireball, as thrown by a Ghast for example.
*/ */
FIREBALL("Fireball", LargeFireball.class, 12), FIREBALL("fireball", LargeFireball.class, 12),
/** /**
* A flying small fireball, such as thrown by a Blaze or player. * A flying small fireball, such as thrown by a Blaze or player.
*/ */
SMALL_FIREBALL("SmallFireball", SmallFireball.class, 13), SMALL_FIREBALL("small_fireball", SmallFireball.class, 13),
/** /**
* A flying ender pearl. * A flying ender pearl.
*/ */
ENDER_PEARL("ThrownEnderpearl", EnderPearl.class, 14), ENDER_PEARL("ender_pearl", EnderPearl.class, 14),
/** /**
* An ender eye signal. * An ender eye signal.
*/ */
ENDER_SIGNAL("EyeOfEnderSignal", EnderSignal.class, 15), ENDER_SIGNAL("eye_of_ender_signal", EnderSignal.class, 15),
/**
* A flying splash potion.
*/
SPLASH_POTION("potion", SplashPotion.class, 16, false),
/** /**
* A flying experience bottle. * A flying experience bottle.
*/ */
THROWN_EXP_BOTTLE("ThrownExpBottle", ThrownExpBottle.class, 17), THROWN_EXP_BOTTLE("xp_bottle", ThrownExpBottle.class, 17),
/** /**
* An item frame on a wall. * An item frame on a wall.
*/ */
ITEM_FRAME("ItemFrame", ItemFrame.class, 18), ITEM_FRAME("item_frame", ItemFrame.class, 18),
/** /**
* A flying wither skull projectile. * A flying wither skull projectile.
*/ */
WITHER_SKULL("WitherSkull", WitherSkull.class, 19), WITHER_SKULL("wither_skull", WitherSkull.class, 19),
/** /**
* Primed TNT that is about to explode. * Primed TNT that is about to explode.
*/ */
PRIMED_TNT("PrimedTnt", TNTPrimed.class, 20), PRIMED_TNT("tnt", TNTPrimed.class, 20),
/** /**
* A block that is going to or is about to fall. * A block that is going to or is about to fall.
*/ */
FALLING_BLOCK("FallingSand", FallingBlock.class, 21, false), FALLING_BLOCK("falling_block", FallingBlock.class, 21, false),
/** /**
* Internal representation of a Firework once it has been launched. * Internal representation of a Firework once it has been launched.
*/ */
FIREWORK("FireworksRocketEntity", Firework.class, 22, false), FIREWORK("fireworks_rocket", Firework.class, 22, false),
/** /**
* Like {@link #ARROW} but tipped with a specific potion which is applied on contact. * @see Husk
*/ */
TIPPED_ARROW("TippedArrow", TippedArrow.class, 23), HUSK("husk", Husk.class, 23),
/** /**
* Like {@link #TIPPED_ARROW} but causes the {@link PotionEffectType#GLOWING} effect on all team members. * Like {@link #TIPPED_ARROW} but causes the {@link PotionEffectType#GLOWING} effect on all team members.
*/ */
SPECTRAL_ARROW("SpectralArrow", SpectralArrow.class, 24), SPECTRAL_ARROW("spectral_arrow", SpectralArrow.class, 24),
/** /**
* Bullet fired by {@link #SHULKER}. * Bullet fired by {@link #SHULKER}.
*/ */
SHULKER_BULLET("ShulkerBullet", ShulkerBullet.class, 25), SHULKER_BULLET("shulker_bullet", ShulkerBullet.class, 25),
/** /**
* Like {@link #FIREBALL} but with added effects. * Like {@link #FIREBALL} but with added effects.
*/ */
DRAGON_FIREBALL("DragonFireball", DragonFireball.class, 26), DRAGON_FIREBALL("dragon_fireball", DragonFireball.class, 26),
/**
* @see ZombieVillager
*/
ZOMBIE_VILLAGER("zombie_villager", ZombieVillager.class, 27),
/**
* @see SkeletonHorse
*/
SKELETON_HORSE("skeleton_horse", SkeletonHorse.class, 28),
/**
* @see ZombieHorse
*/
ZOMBIE_HORSE("zombie_horse", ZombieHorse.class, 29),
/** /**
* Mechanical entity with an inventory for placing weapons / armor into. * Mechanical entity with an inventory for placing weapons / armor into.
*/ */
ARMOR_STAND("ArmorStand", ArmorStand.class, 30), ARMOR_STAND("armor_stand", ArmorStand.class, 30),
/**
* @see Donkey
*/
DONKEY("donkey", Donkey.class, 31),
/**
* @see Mule
*/
MULE("mule", Mule.class, 32),
/**
* @see EvokerFangs
*/
EVOKER_FANGS("evocation_fangs", EvokerFangs.class, 33),
/**
* @see Evoker
*/
EVOKER("evocation_illager", Evoker.class, 34),
/**
* @see Vex
*/
VEX("vex", Vex.class, 35),
/**
* @see Vindicator
*/
VINDICATOR("vindication_illager", Vindicator.class, 36),
/** /**
* @see CommandMinecart * @see CommandMinecart
*/ */
MINECART_COMMAND("MinecartCommandBlock", CommandMinecart.class, 40), MINECART_COMMAND("commandblock_minecart", CommandMinecart.class, 40),
/** /**
* A placed boat. * A placed boat.
*/ */
BOAT("Boat", Boat.class, 41), BOAT("boat", Boat.class, 41),
/** /**
* @see RideableMinecart * @see RideableMinecart
*/ */
MINECART("MinecartRideable", RideableMinecart.class, 42), MINECART("minecart", RideableMinecart.class, 42),
/** /**
* @see StorageMinecart * @see StorageMinecart
*/ */
MINECART_CHEST("MinecartChest", StorageMinecart.class, 43), MINECART_CHEST("chest_minecart", StorageMinecart.class, 43),
/** /**
* @see PoweredMinecart * @see PoweredMinecart
*/ */
MINECART_FURNACE("MinecartFurnace", PoweredMinecart.class, 44), MINECART_FURNACE("chest_minecart", PoweredMinecart.class, 44),
/** /**
* @see ExplosiveMinecart * @see ExplosiveMinecart
*/ */
MINECART_TNT("MinecartTNT", ExplosiveMinecart.class, 45), MINECART_TNT("tnt_minecart", ExplosiveMinecart.class, 45),
/** /**
* @see HopperMinecart * @see HopperMinecart
*/ */
MINECART_HOPPER("MinecartHopper", HopperMinecart.class, 46), MINECART_HOPPER("hopper_minecart", HopperMinecart.class, 46),
/** /**
* @see SpawnerMinecart * @see SpawnerMinecart
*/ */
MINECART_MOB_SPAWNER("MinecartMobSpawner", SpawnerMinecart.class, 47), MINECART_MOB_SPAWNER("spawner_minecart", SpawnerMinecart.class, 47),
CREEPER("Creeper", Creeper.class, 50), CREEPER("creeper", Creeper.class, 50),
SKELETON("Skeleton", Skeleton.class, 51), SKELETON("skeleton", Skeleton.class, 51),
SPIDER("Spider", Spider.class, 52), SPIDER("spider", Spider.class, 52),
GIANT("Giant", Giant.class, 53), GIANT("giant", Giant.class, 53),
ZOMBIE("Zombie", Zombie.class, 54), ZOMBIE("zombie", Zombie.class, 54),
SLIME("Slime", Slime.class, 55), SLIME("slime", Slime.class, 55),
GHAST("Ghast", Ghast.class, 56), GHAST("ghast", Ghast.class, 56),
PIG_ZOMBIE("PigZombie", PigZombie.class, 57), PIG_ZOMBIE("zombie_pigman", PigZombie.class, 57),
ENDERMAN("Enderman", Enderman.class, 58), ENDERMAN("enderman", Enderman.class, 58),
CAVE_SPIDER("CaveSpider", CaveSpider.class, 59), CAVE_SPIDER("cave_spider", CaveSpider.class, 59),
SILVERFISH("Silverfish", Silverfish.class, 60), SILVERFISH("silverfish", Silverfish.class, 60),
BLAZE("Blaze", Blaze.class, 61), BLAZE("blaze", Blaze.class, 61),
MAGMA_CUBE("LavaSlime", MagmaCube.class, 62), MAGMA_CUBE("magma_cube", MagmaCube.class, 62),
ENDER_DRAGON("EnderDragon", EnderDragon.class, 63), ENDER_DRAGON("ender_dragon", EnderDragon.class, 63),
WITHER("WitherBoss", Wither.class, 64), WITHER("wither", Wither.class, 64),
BAT("Bat", Bat.class, 65), BAT("bat", Bat.class, 65),
WITCH("Witch", Witch.class, 66), WITCH("witch", Witch.class, 66),
ENDERMITE("Endermite", Endermite.class, 67), ENDERMITE("endermite", Endermite.class, 67),
GUARDIAN("Guardian", Guardian.class, 68), GUARDIAN("guardian", Guardian.class, 68),
SHULKER("Shulker", Shulker.class, 69), SHULKER("shulker", Shulker.class, 69),
PIG("Pig", Pig.class, 90), PIG("pig", Pig.class, 90),
SHEEP("Sheep", Sheep.class, 91), SHEEP("sheep", Sheep.class, 91),
COW("Cow", Cow.class, 92), COW("cow", Cow.class, 92),
CHICKEN("Chicken", Chicken.class, 93), CHICKEN("chicken", Chicken.class, 93),
SQUID("Squid", Squid.class, 94), SQUID("squid", Squid.class, 94),
WOLF("Wolf", Wolf.class, 95), WOLF("wolf", Wolf.class, 95),
MUSHROOM_COW("MushroomCow", MushroomCow.class, 96), MUSHROOM_COW("mooshroom", MushroomCow.class, 96),
SNOWMAN("SnowMan", Snowman.class, 97), SNOWMAN("snowman", Snowman.class, 97),
OCELOT("Ozelot", Ocelot.class, 98), OCELOT("ocelot", Ocelot.class, 98),
IRON_GOLEM("VillagerGolem", IronGolem.class, 99), IRON_GOLEM("villager_golem", IronGolem.class, 99),
HORSE("EntityHorse", Horse.class, 100), HORSE("horse", Horse.class, 100),
RABBIT("Rabbit", Rabbit.class, 101), RABBIT("rabbit", Rabbit.class, 101),
POLAR_BEAR("PolarBear", PolarBear.class, 102), POLAR_BEAR("polar_bear", PolarBear.class, 102),
VILLAGER("Villager", Villager.class, 120), LLAMA("llama", Llama.class, 103),
ENDER_CRYSTAL("EnderCrystal", EnderCrystal.class, 200), LLAMA_SPIT("llama_spit", LlamaSpit.class, 104),
VILLAGER("villager", Villager.class, 120),
ENDER_CRYSTAL("ender_crystal", EnderCrystal.class, 200),
// These don't have an entity ID in nms.EntityTypes. // These don't have an entity ID in nms.EntityTypes.
/**
* A flying splash potion
*/
SPLASH_POTION(null, SplashPotion.class, -1, false),
/** /**
* A flying lingering potion * A flying lingering potion
*/ */
LINGERING_POTION(null, LingeringPotion.class, -1, false), LINGERING_POTION(null, LingeringPotion.class, -1, false),
AREA_EFFECT_CLOUD(null, AreaEffectCloud.class, -1),
/**
* A flying chicken egg.
*/
EGG(null, Egg.class, -1, false),
/** /**
* A fishing line and bobber. * A fishing line and bobber.
*/ */
FISHING_HOOK(null, Fish.class, -1, false), FISHING_HOOK(null, FishHook.class, -1, false),
/** /**
* A bolt of lightning. * A bolt of lightning.
* <p> * <p>
@ -199,6 +252,11 @@ public enum EntityType {
WEATHER(null, Weather.class, -1, false), WEATHER(null, Weather.class, -1, false),
PLAYER(null, Player.class, -1, false), PLAYER(null, Player.class, -1, false),
COMPLEX_PART(null, ComplexEntityPart.class, -1, false), COMPLEX_PART(null, ComplexEntityPart.class, -1, false),
/**
* Like {@link #ARROW} but tipped with a specific potion which is applied on
* contact.
*/
TIPPED_ARROW("TippedArrow", TippedArrow.class, -1),
/** /**
* An unknown entity without an Entity Class * An unknown entity without an Entity Class
*/ */

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents an Evoker.
*/
public interface Evoker extends Monster { }

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents Evoker Fangs.
*/
public interface EvokerFangs extends Entity { }

Datei anzeigen

@ -1,9 +0,0 @@
package org.bukkit.entity;
/**
* Represents a falling block.
*
* @deprecated See {@link FallingBlock}
*/
@Deprecated
public interface FallingSand extends FallingBlock {}

Datei anzeigen

@ -6,16 +6,14 @@ public interface Guardian extends Monster {
* Check if the Guardian is an elder Guardian * Check if the Guardian is an elder Guardian
* *
* @return true if the Guardian is an Elder Guardian, false if not * @return true if the Guardian is an Elder Guardian, false if not
* @deprecated Entity subtypes will be separate entities in a future Minecraft release * @deprecated should check if instance of {@link ElderGuardian}.
*/ */
@Deprecated @Deprecated
public boolean isElder(); public boolean isElder();
/** /**
* Set the Guardian to an elder Guardian or not * @param shouldBeElder
* * @deprecated Must spawn a new {@link ElderGuardian}.
* @param shouldBeElder True if this Guardian should be a elder Guardian, false if not
* @deprecated Entity subtypes will be separate entities in a future Minecraft release
*/ */
@Deprecated @Deprecated
public void setElder(boolean shouldBeElder); public void setElder(boolean shouldBeElder);

Datei anzeigen

@ -1,18 +1,16 @@
package org.bukkit.entity; package org.bukkit.entity;
import org.bukkit.inventory.HorseInventory; import org.bukkit.inventory.HorseInventory;
import org.bukkit.inventory.InventoryHolder;
/** /**
* Represents a Horse. * Represents a Horse.
* @deprecated Entity subtypes will be separate entities in a future Minecraft release
*/ */
@Deprecated public interface Horse extends AbstractHorse {
public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable {
/** /**
* Represents the different types of horses that may exist. * @deprecated different variants are differing classes
*/ */
@Deprecated
public enum Variant { public enum Variant {
/** /**
* A normal horse * A normal horse
@ -34,6 +32,10 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable {
* A skeleton horse * A skeleton horse
*/ */
SKELETON_HORSE, SKELETON_HORSE,
/**
* Not really a horse :)
*/
LLAMA
; ;
} }
@ -99,37 +101,6 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable {
; ;
} }
/**
* Gets the horse's variant.
* <p>
* A horse's variant defines its physical appearance and capabilities.
* Whether a horse is a regular horse, donkey, mule, or other kind of
* horse is determined using the variant.
*
* @return a {@link Variant} representing the horse's variant
* @deprecated Entity subtypes will be separate entities in a future Minecraft release
*/
@Deprecated
public Variant getVariant();
/**
* Sets the horse's variant.
* <p>
* A horse's variant defines its physical appearance and capabilities.
* Whether a horse is a regular horse, donkey, mule, or other kind of
* horse can be set using the variant.
* <p>
* Setting a horse's variant does not change its attributes such as
* its owner and its tamed status, but changing a mule or donkey
* with a chest to another variant which does not support a chest
* will remove the chest and its contents.
*
* @param variant a {@link Variant} for this horse
* @deprecated Entity subtypes will be separate entities in a future Minecraft release
*/
@Deprecated
public void setVariant(Variant variant);
/** /**
* Gets the horse's color. * Gets the horse's color.
* <p> * <p>
@ -173,90 +144,19 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable {
public void setStyle(Style style); public void setStyle(Style style);
/** /**
* Gets whether the horse has a chest equipped. * @return
* * @deprecated see {@link ChestedHorse}
* @return true if the horse has chest storage
*/ */
@Deprecated
public boolean isCarryingChest(); public boolean isCarryingChest();
/** /**
* Sets whether the horse has a chest equipped. * @param chest
* Removing a chest will also clear the chest's inventory. * @deprecated see {@link ChestedHorse}
*
* @param chest true if the horse should have a chest
*/ */
@Deprecated
public void setCarryingChest(boolean chest); public void setCarryingChest(boolean chest);
/**
* Gets the domestication level of this horse.
* <p>
* A higher domestication level indicates that the horse is closer to
* becoming tame. As the domestication level gets closer to the max
* domestication level, the chance of the horse becoming tame increases.
*
* @return domestication level
*/
public int getDomestication();
/**
* Sets the domestication level of this horse.
* <p>
* Setting the domestication level to a high value will increase the
* horse's chances of becoming tame.
* <p>
* Domestication level must be greater than zero and no greater than
* the max domestication level of the horse, determined with
* {@link #getMaxDomestication()}
*
* @param level domestication level
*/
public void setDomestication(int level);
/**
* Gets the maximum domestication level of this horse.
* <p>
* The higher this level is, the longer it will likely take
* for the horse to be tamed.
*
* @return the max domestication level
*/
public int getMaxDomestication();
/**
* Sets the maximum domestication level of this horse.
* <p>
* Setting a higher max domestication will increase the amount of
* domesticating (feeding, riding, etc.) necessary in order to tame it,
* while setting a lower max value will have the opposite effect.
* <p>
* Maximum domestication must be greater than zero.
*
* @param level the max domestication level
*/
public void setMaxDomestication(int level);
/**
* Gets the jump strength of this horse.
* <p>
* Jump strength defines how high the horse can jump. A higher jump strength
* increases how high a jump will go.
*
* @return the horse's jump strength
*/
public double getJumpStrength();
/**
* Sets the jump strength of this horse.
* <p>
* A higher jump strength increases how high a jump will go.
* Setting a jump strength to 0 will result in no jump.
* You cannot set a jump strength to a value below 0 or
* above 2.
*
* @param strength jump strength for this horse
*/
public void setJumpStrength(double strength);
@Override @Override
public HorseInventory getInventory(); public HorseInventory getInventory();
} }

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents a Husk - variant of {@link Zombie}.
*/
public interface Husk extends Zombie { }

Datei anzeigen

@ -0,0 +1,49 @@
package org.bukkit.entity;
import org.bukkit.inventory.LlamaInventory;
/**
* Represents a Llama.
*/
public interface Llama extends ChestedHorse {
/**
* Represents the base color that the llama has.
*/
public enum Color {
/**
* A cream-colored llama.
*/
CREAMY,
/**
* A white llama.
*/
WHITE,
/**
* A brown llama.
*/
BROWN,
/**
* A gray llama.
*/
GRAY;
}
/**
* Gets the llamas's color.
*
* @return a {@link Color} representing the llama's color
*/
public Color getColor();
/**
* Sets the llama's color.
*
* @param color a {@link Color} for this llama
*/
public void setColor(Color color);
@Override
public LlamaInventory getInventory();
}

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents Llama spit.
*/
public interface LlamaSpit extends Projectile { }

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents a Mule - variant of {@link ChestedHorse}.
*/
public interface Mule extends ChestedHorse { }

Datei anzeigen

@ -1,9 +0,0 @@
package org.bukkit.entity;
/**
* @deprecated This class has been moved into a sub package; {@link
* org.bukkit.entity.minecart.PoweredMinecart} should be used instead.
* @see org.bukkit.entity.minecart.PoweredMinecart
*/
@Deprecated
public interface PoweredMinecart extends org.bukkit.entity.minecart.PoweredMinecart {}

Datei anzeigen

@ -9,23 +9,21 @@ public interface Skeleton extends Monster {
* Gets the current type of this skeleton. * Gets the current type of this skeleton.
* *
* @return Current type * @return Current type
* @deprecated Entity subtypes will be separate entities in a future Minecraft release * @deprecated should check what class instance this is
*/ */
@Deprecated @Deprecated
public SkeletonType getSkeletonType(); public SkeletonType getSkeletonType();
/** /**
* Sets the new type of this skeleton. * @deprecated Must spawn a new subtype variant
*
* @param type New type
* @deprecated Entity subtypes will be separate entities in a future Minecraft release
*/ */
@Deprecated @Deprecated
public void setSkeletonType(SkeletonType type); public void setSkeletonType(SkeletonType type);
/* /*
* Represents the various different Skeleton types. * @deprecated classes are different types
*/ */
@Deprecated
public enum SkeletonType { public enum SkeletonType {
/** /**

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents a SkeletonHorse - variant of {@link AbstractHorse}.
*/
public interface SkeletonHorse extends AbstractHorse { }

Datei anzeigen

@ -1,9 +0,0 @@
package org.bukkit.entity;
/**
* @deprecated This class has been moved into a sub package; {@link
* org.bukkit.entity.minecart.StorageMinecart} should be used instead.
* @see org.bukkit.entity.minecart.StorageMinecart
*/
@Deprecated
public interface StorageMinecart extends org.bukkit.entity.minecart.StorageMinecart {}

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents a Stray - variant of {@link Skeleton}.
*/
public interface Stray extends Skeleton { }

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents a Vex.
*/
public interface Vex extends Monster { }

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents a Vindicator.
*/
public interface Vindicator extends Monster { }

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents a WitherSkeleton - variant of {@link Skeleton}.
*/
public interface WitherSkeleton extends Skeleton { }

Datei anzeigen

@ -23,35 +23,28 @@ public interface Zombie extends Monster {
* Gets whether the zombie is a villager * Gets whether the zombie is a villager
* *
* @return Whether the zombie is a villager * @return Whether the zombie is a villager
* @deprecated Entity subtypes will be separate entities in a future Minecraft release * @deprecated check if instanceof {@link ZombieVillager}.
*/ */
@Deprecated @Deprecated
public boolean isVillager(); public boolean isVillager();
/** /**
* Sets whether the zombie is a villager * @param flag
* * @deprecated must spawn {@link ZombieVillager}.
* @param flag Whether the zombie is a villager
* @deprecated Entity subtypes will be separate entities in a future Minecraft release
*/ */
@Deprecated @Deprecated
public void setVillager(boolean flag); public void setVillager(boolean flag);
/** /**
* Sets whether the zombie is a villager * @param profession
* * @see ZombieVillager#getVillagerProfession()
* @param profession the profession of the villager or null to clear
* @deprecated Entity subtypes will be separate entities in a future Minecraft release
*/ */
@Deprecated @Deprecated
public void setVillagerProfession(Villager.Profession profession); public void setVillagerProfession(Villager.Profession profession);
/** /**
* Returns the villager profession of the zombie if the * @return
* zombie is a villager * @see ZombieVillager#getVillagerProfession()
*
* @return the profession or null
* @deprecated Entity subtypes will be separate entities in a future Minecraft release
*/ */
@Deprecated @Deprecated
public Villager.Profession getVillagerProfession(); public Villager.Profession getVillagerProfession();

Datei anzeigen

@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents a ZombieHorse - variant of {@link AbstractHorse}.
*/
public interface ZombieHorse extends AbstractHorse { }

Datei anzeigen

@ -0,0 +1,19 @@
package org.bukkit.entity;
/**
* Represents a {@link Zombie} which was once a {@link Villager}.
*/
public interface ZombieVillager extends Zombie {
/**
* Sets the villager profession of this zombie.
*/
public void setVillagerProfession(Villager.Profession profession);
/**
* Returns the villager profession of this zombie.
*
* @return the profession or null
*/
public Villager.Profession getVillagerProfession();
}

Datei anzeigen

@ -19,11 +19,6 @@ public class BlockIgniteEvent extends BlockEvent implements Cancellable {
private final Block ignitingBlock; private final Block ignitingBlock;
private boolean cancel; private boolean cancel;
@Deprecated
public BlockIgniteEvent(final Block theBlock, final IgniteCause cause, final Player thePlayer) {
this(theBlock, cause, (Entity) thePlayer);
}
public BlockIgniteEvent(final Block theBlock, final IgniteCause cause, final Entity ignitingEntity) { public BlockIgniteEvent(final Block theBlock, final IgniteCause cause, final Entity ignitingEntity) {
this(theBlock, cause, ignitingEntity, null); this(theBlock, cause, ignitingEntity, null);
} }

Datei anzeigen

@ -96,13 +96,6 @@ public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
* When a creature spawns because of a lightning strike * When a creature spawns because of a lightning strike
*/ */
LIGHTNING, LIGHTNING,
/**
* When a creature is spawned by a player that is sleeping
*
* @deprecated No longer used
*/
@Deprecated
BED,
/** /**
* When a snowman is spawned by being built * When a snowman is spawned by being built
*/ */

Datei anzeigen

@ -3,7 +3,6 @@ package org.bukkit.event.entity;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
@ -17,19 +16,6 @@ public class EntityChangeBlockEvent extends EntityEvent implements Cancellable {
private final Material to; private final Material to;
private final byte data; private final byte data;
/**
*
* @param what the LivingEntity causing the change
* @param block the block (before the change)
* @param to the future material being changed to
* @deprecated Provided as a backward compatibility before the data byte
* was provided, and type increased to all entities
*/
@Deprecated
public EntityChangeBlockEvent(final LivingEntity what, final Block block, final Material to) {
this (what, block, to, (byte) 0);
}
/** /**
* *
* @param what the Entity causing the change * @param what the Entity causing the change

Datei anzeigen

@ -12,11 +12,6 @@ import org.bukkit.entity.Entity;
public class EntityDamageByBlockEvent extends EntityDamageEvent { public class EntityDamageByBlockEvent extends EntityDamageEvent {
private final Block damager; private final Block damager;
@Deprecated
public EntityDamageByBlockEvent(final Block damager, final Entity damagee, final DamageCause cause, final int damage) {
this(damager, damagee, cause, (double) damage);
}
@Deprecated @Deprecated
public EntityDamageByBlockEvent(final Block damager, final Entity damagee, final DamageCause cause, final double damage) { public EntityDamageByBlockEvent(final Block damager, final Entity damagee, final DamageCause cause, final double damage) {
super(damagee, cause, damage); super(damagee, cause, damage);

Datei anzeigen

@ -11,11 +11,6 @@ import org.bukkit.entity.Entity;
public class EntityDamageByEntityEvent extends EntityDamageEvent { public class EntityDamageByEntityEvent extends EntityDamageEvent {
private final Entity damager; private final Entity damager;
@Deprecated
public EntityDamageByEntityEvent(final Entity damager, final Entity damagee, final DamageCause cause, final int damage) {
this(damager, damagee, cause, (double) damage);
}
@Deprecated @Deprecated
public EntityDamageByEntityEvent(final Entity damager, final Entity damagee, final DamageCause cause, final double damage) { public EntityDamageByEntityEvent(final Entity damager, final Entity damagee, final DamageCause cause, final double damage) {
super(damagee, cause, damage); super(damagee, cause, damage);

Datei anzeigen

@ -28,11 +28,6 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
private boolean cancelled; private boolean cancelled;
private final DamageCause cause; private final DamageCause cause;
@Deprecated
public EntityDamageEvent(final Entity damagee, final DamageCause cause, final int damage) {
this(damagee, cause, (double) damage);
}
@Deprecated @Deprecated
public EntityDamageEvent(final Entity damagee, final DamageCause cause, final double damage) { public EntityDamageEvent(final Entity damagee, final DamageCause cause, final double damage) {
this(damagee, cause, new EnumMap<DamageModifier, Double>(ImmutableMap.of(DamageModifier.BASE, damage)), new EnumMap<DamageModifier, Function<? super Double, Double>>(ImmutableMap.of(DamageModifier.BASE, ZERO))); this(damagee, cause, new EnumMap<DamageModifier, Double>(ImmutableMap.of(DamageModifier.BASE, damage)), new EnumMap<DamageModifier, Function<? super Double, Double>>(ImmutableMap.of(DamageModifier.BASE, ZERO)));
@ -431,6 +426,13 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
* <p> * <p>
* Damage: 1 * Damage: 1
*/ */
HOT_FLOOR HOT_FLOOR,
/**
* Damage caused when an entity is colliding with too many entities due
* to the maxEntityCramming game rule.
* <p>
* Damage: 6
*/
CRAMMING
} }
} }

Datei anzeigen

@ -14,11 +14,6 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
private double amount; private double amount;
private final RegainReason regainReason; private final RegainReason regainReason;
@Deprecated
public EntityRegainHealthEvent(final Entity entity, final int amount, final RegainReason regainReason) {
this(entity, (double) amount, regainReason);
}
public EntityRegainHealthEvent(final Entity entity, final double amount, final RegainReason regainReason) { public EntityRegainHealthEvent(final Entity entity, final double amount, final RegainReason regainReason) {
super(entity); super(entity);
this.amount = amount; this.amount = amount;

Datei anzeigen

@ -0,0 +1,45 @@
package org.bukkit.event.entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
/**
* Called when an entity dies and may have the opportunity to be resurrected.
* Will be called in a cancelled state if the entity does not have a totem
* equipped.
*/
public class EntityResurrectEvent extends EntityEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
//
private boolean cancelled;
public EntityResurrectEvent(LivingEntity what) {
super(what);
}
@Override
public LivingEntity getEntity() {
return (LivingEntity) entity;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}

Datei anzeigen

@ -1,8 +1,8 @@
package org.bukkit.event.entity; package org.bukkit.event.entity;
import org.bukkit.entity.Horse;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.bukkit.entity.AbstractHorse;
/** /**
* Called when a horse jumps. * Called when a horse jumps.
@ -12,7 +12,7 @@ public class HorseJumpEvent extends EntityEvent implements Cancellable {
private boolean cancelled; private boolean cancelled;
private float power; private float power;
public HorseJumpEvent(final Horse horse, final float power) { public HorseJumpEvent(final AbstractHorse horse, final float power) {
super(horse); super(horse);
this.power = power; this.power = power;
} }
@ -30,8 +30,8 @@ public class HorseJumpEvent extends EntityEvent implements Cancellable {
} }
@Override @Override
public Horse getEntity() { public AbstractHorse getEntity() {
return (Horse) entity; return (AbstractHorse) entity;
} }
/** /**
@ -47,7 +47,7 @@ public class HorseJumpEvent extends EntityEvent implements Cancellable {
* Power does not affect how high the horse is capable of jumping, only * Power does not affect how high the horse is capable of jumping, only
* how much of its jumping capability will be used in this jump. To set * how much of its jumping capability will be used in this jump. To set
* the horse's overall jump strength, see {@link * the horse's overall jump strength, see {@link
* Horse#setJumpStrength(double)}. * AbstractHorse#setJumpStrength(double)}.
* *
* @return jump strength * @return jump strength
*/ */

Datei anzeigen

@ -11,11 +11,6 @@ import org.bukkit.inventory.Recipe;
public class CraftItemEvent extends InventoryClickEvent { public class CraftItemEvent extends InventoryClickEvent {
private Recipe recipe; private Recipe recipe;
@Deprecated
public CraftItemEvent(Recipe recipe, InventoryView what, SlotType type, int slot, boolean right, boolean shift) {
this(recipe, what, type, slot, right ? (shift ? ClickType.SHIFT_RIGHT : ClickType.RIGHT) : (shift ? ClickType.SHIFT_LEFT : ClickType.LEFT), InventoryAction.PICKUP_ALL);
}
public CraftItemEvent(Recipe recipe, InventoryView what, SlotType type, int slot, ClickType click, InventoryAction action) { public CraftItemEvent(Recipe recipe, InventoryView what, SlotType type, int slot, ClickType click, InventoryAction action) {
super(what, type, slot, click, action); super(what, type, slot, click, action);
this.recipe = recipe; this.recipe = recipe;

Datei anzeigen

@ -53,11 +53,6 @@ public class InventoryClickEvent extends InventoryInteractEvent {
private ItemStack current = null; private ItemStack current = null;
private int hotbarKey = -1; private int hotbarKey = -1;
@Deprecated
public InventoryClickEvent(InventoryView view, SlotType type, int slot, boolean right, boolean shift) {
this(view, type, slot, right ? (shift ? ClickType.SHIFT_RIGHT : ClickType.RIGHT) : (shift ? ClickType.SHIFT_LEFT : ClickType.LEFT), InventoryAction.SWAP_WITH_CURSOR);
}
public InventoryClickEvent(InventoryView view, SlotType type, int slot, ClickType click, InventoryAction action) { public InventoryClickEvent(InventoryView view, SlotType type, int slot, ClickType click, InventoryAction action) {
super(view); super(view);
this.slot_type = type; this.slot_type = type;

Datei anzeigen

@ -49,7 +49,6 @@ public class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancell
private static final HandlerList handlers = new HandlerList(); private static final HandlerList handlers = new HandlerList();
private boolean cancel = false; private boolean cancel = false;
private String message; private String message;
private String format = "<%1$s> %2$s";
private final Set<Player> recipients; private final Set<Player> recipients;
public PlayerCommandPreprocessEvent(final Player player, final String message) { public PlayerCommandPreprocessEvent(final Player player, final String message) {
@ -110,38 +109,6 @@ public class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancell
this.player = player; this.player = player;
} }
/**
* Gets the format to use to display this chat message
*
* @deprecated This method is provided for backward compatibility with no
* guarantee to the use of the format.
* @return String.Format compatible format string
*/
@Deprecated
public String getFormat() {
return format;
}
/**
* Sets the format to use to display this chat message
*
* @deprecated This method is provided for backward compatibility with no
* guarantee to the effect of modifying the format.
* @param format String.Format compatible format string
*/
@Deprecated
public void setFormat(final String format) {
// Oh for a better way to do this!
try {
String.format(format, player, message);
} catch (RuntimeException ex) {
ex.fillInStackTrace();
throw ex;
}
this.format = format;
}
/** /**
* Gets a set of recipients that this chat message will be displayed to. * Gets a set of recipients that this chat message will be displayed to.
* <p> * <p>

Datei anzeigen

@ -17,18 +17,6 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable {
private final State state; private final State state;
private final Fish hookEntity; private final Fish hookEntity;
/**
* @deprecated replaced by {@link #PlayerFishEvent(Player, Entity, Fish,
* State)} to include the {@link Fish} hook entity.
* @param player the player fishing
* @param entity the caught entity
* @param state the state of fishing
*/
@Deprecated
public PlayerFishEvent(final Player player, final Entity entity, final State state) {
this(player, entity, null, state);
}
public PlayerFishEvent(final Player player, final Entity entity, final Fish hookEntity, final State state) { public PlayerFishEvent(final Player player, final Entity entity, final Fish hookEntity, final State state) {
super(player); super(player);
this.entity = entity; this.entity = entity;

Datei anzeigen

@ -1,44 +0,0 @@
package org.bukkit.event.player;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryOpenEvent;
import org.bukkit.inventory.Inventory;
/**
* Represents a player related inventory event; note that this event never
* actually did anything
*
* @deprecated Use {@link InventoryClickEvent} or {@link InventoryOpenEvent}
* instead, or one of the other inventory events in {@link
* org.bukkit.event.inventory}.
*/
@Deprecated
public class PlayerInventoryEvent extends PlayerEvent {
private static final HandlerList handlers = new HandlerList();
protected Inventory inventory;
public PlayerInventoryEvent(final Player player, final Inventory inventory) {
super(player);
this.inventory = inventory;
}
/**
* Gets the Inventory involved in this event
*
* @return Inventory
*/
public Inventory getInventory() {
return inventory;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}

Datei anzeigen

@ -15,25 +15,6 @@ public class PlayerLoginEvent extends PlayerEvent {
private Result result = Result.ALLOWED; private Result result = Result.ALLOWED;
private String message = ""; private String message = "";
/**
* @deprecated Address should be provided in other constructor
* @param player The {@link Player} for this event
*/
@Deprecated
public PlayerLoginEvent(final Player player) {
this(player, "", null);
}
/**
* @deprecated Address should be provided in other constructor
* @param player The {@link Player} for this event
* @param hostname The hostname that was used to connect to the server
*/
@Deprecated
public PlayerLoginEvent(final Player player, final String hostname) {
this(player, hostname, null);
}
/** /**
* This constructor defaults message to an empty string, and result to * This constructor defaults message to an empty string, and result to
* ALLOWED * ALLOWED
@ -49,18 +30,6 @@ public class PlayerLoginEvent extends PlayerEvent {
this.address = address; this.address = address;
} }
/**
* @deprecated Address and hostname should be provided in other
* constructor
* @param player The {@link Player} for this event
* @param result The result status for this event
* @param message The message to be displayed if result denies login
*/
@Deprecated
public PlayerLoginEvent(final Player player, final Result result, final String message) {
this(player, "", null, result, message);
}
/** /**
* This constructor pre-configures the event with a result and message * This constructor pre-configures the event with a result and message
* *

Datei anzeigen

@ -0,0 +1,23 @@
package org.bukkit.inventory;
import org.bukkit.entity.Llama;
/**
* An interface to the inventory of a {@link Llama}.
*/
public interface LlamaInventory extends Inventory {
/*
* Gets the item in the llama's decor slot.
*
* @return the decor item
*/
ItemStack getDecor();
/**
* Sets the item in the llama's decor slot.
*
* @param stack the new item
*/
void setDecor(ItemStack stack);
}

Datei anzeigen

@ -19,5 +19,29 @@ public interface MapMeta extends ItemMeta {
*/ */
void setScaling(boolean value); void setScaling(boolean value);
/**
* Checks for existence of a location name.
*
* @return true if this has a location name
*/
boolean hasLocationName();
/**
* Gets the location name that is set.
* <p>
* Plugins should check that hasLocationName() returns <code>true</code>
* before calling this method.
*
* @return the location name that is set
*/
String getLocationName();
/**
* Sets the location name.
*
* @param name the name to set
*/
void setLocationName(String name);
MapMeta clone(); MapMeta clone();
} }

Datei anzeigen

@ -154,4 +154,19 @@ public interface MapView {
*/ */
public boolean removeRenderer(MapRenderer renderer); public boolean removeRenderer(MapRenderer renderer);
/**
* Whether the map will show a smaller position cursor (true), or no
* position cursor (false) when cursor is outside of map's range.
*
* @return unlimited tracking state
*/
boolean isUnlimitedTracking();
/**
* Whether the map will show a smaller position cursor (true), or no
* position cursor (false) when cursor is outside of map's range.
*
* @param unlimited tracking state
*/
void setUnlimitedTracking(boolean unlimited);
} }

Datei anzeigen

@ -67,27 +67,6 @@ public abstract class JavaPlugin extends PluginBase {
((PluginClassLoader) classLoader).initialize(this); ((PluginClassLoader) classLoader).initialize(this);
} }
/**
* @deprecated This method is intended for unit testing purposes when the
* other {@linkplain #JavaPlugin(JavaPluginLoader,
* PluginDescriptionFile, File, File) constructor} cannot be used.
* <p>
* Its existence may be temporary.
* @param loader the plugin loader
* @param server the server instance
* @param description the plugin's description
* @param dataFolder the plugin's data folder
* @param file the location of the plugin
*/
@Deprecated
protected JavaPlugin(final PluginLoader loader, final Server server, final PluginDescriptionFile description, final File dataFolder, final File file) {
final ClassLoader classLoader = this.getClass().getClassLoader();
if (classLoader instanceof PluginClassLoader) {
throw new IllegalStateException("Cannot use initialization constructor at runtime");
}
init(loader, server, description, dataFolder, file, classLoader);
}
protected JavaPlugin(final JavaPluginLoader loader, final PluginDescriptionFile description, final File dataFolder, final File file) { protected JavaPlugin(final JavaPluginLoader loader, final PluginDescriptionFile description, final File dataFolder, final File file) {
final ClassLoader classLoader = this.getClass().getClassLoader(); final ClassLoader classLoader = this.getClass().getClassLoader();
if (classLoader instanceof PluginClassLoader) { if (classLoader instanceof PluginClassLoader) {
@ -296,23 +275,6 @@ public abstract class JavaPlugin extends PluginBase {
} }
} }
/**
* @param loader the plugin loader
* @param server the server instance
* @param description the plugin's description
* @param dataFolder the plugin's data folder
* @param file the location of the plugin
* @param classLoader the class loader
* @deprecated This method is legacy and will be removed - it must be
* replaced by the specially provided constructor(s).
*/
@Deprecated
protected final void initialize(PluginLoader loader, Server server, PluginDescriptionFile description, File dataFolder, File file, ClassLoader classLoader) {
if (server.getWarningState() == WarningState.OFF) {
return;
}
getLogger().log(Level.WARNING, getClass().getName() + " is already initialized", server.getWarningState() == WarningState.DEFAULT ? null : new AuthorNagException("Explicit initialization"));
}
final void init(PluginLoader loader, Server server, PluginDescriptionFile description, File dataFolder, File file, ClassLoader classLoader) { final void init(PluginLoader loader, Server server, PluginDescriptionFile description, File dataFolder, File file, ClassLoader classLoader) {
this.loader = loader; this.loader = loader;
@ -361,18 +323,6 @@ public abstract class JavaPlugin extends PluginBase {
return input; return input;
} }
/**
* Gets the initialization status of this plugin
*
* @return true if this plugin is initialized, otherwise false
* @deprecated This method cannot return false, as {@link
* JavaPlugin} is now initialized in the constructor.
*/
@Deprecated
public final boolean isInitialized() {
return true;
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */

Datei anzeigen

@ -33,33 +33,6 @@ public class Potion {
this.type = type; this.type = type;
} }
/**
* @deprecated In favour of {@link #Potion(PotionType, int)}
*/
@Deprecated
public Potion(PotionType type, Tier tier) {
this(type, tier == Tier.TWO ? 2 : 1);
Validate.notNull(type, "Type cannot be null");
}
/**
* @deprecated In favour of {@link #Potion(PotionType, int, boolean)}
*/
@Deprecated
public Potion(PotionType type, Tier tier, boolean splash) {
this(type, tier == Tier.TWO ? 2 : 1, splash);
}
/**
* @deprecated In favour of {@link #Potion(PotionType, int, boolean,
* boolean)}
*/
@Deprecated
public Potion(PotionType type, Tier tier, boolean splash, boolean extended) {
this(type, tier, splash);
this.extended = extended;
}
/** /**
* Create a new potion of the given type and level. * Create a new potion of the given type and level.
* *
@ -192,17 +165,6 @@ public class Potion {
return level; return level;
} }
/**
* Returns the {@link Tier} of this potion.
*
* @return The tier of this potion
* @deprecated
*/
@Deprecated
public Tier getTier() {
return level == 2 ? Tier.TWO : Tier.ONE;
}
/** /**
* Returns the {@link PotionType} of this potion. * Returns the {@link PotionType} of this potion.
* *
@ -261,18 +223,6 @@ public class Potion {
splash = isSplash; splash = isSplash;
} }
/**
* Sets the {@link Tier} of this potion.
*
* @param tier The new tier of this potion
* @deprecated In favour of {@link #setLevel(int)}
*/
@Deprecated
public void setTier(Tier tier) {
Validate.notNull(tier, "tier cannot be null");
this.level = (tier == Tier.TWO ? 2 : 1);
}
/** /**
* Sets the {@link PotionType} of this potion. * Sets the {@link PotionType} of this potion.
* *
@ -326,30 +276,6 @@ public class Potion {
return itemStack; return itemStack;
} }
@Deprecated
public enum Tier {
ONE(0),
TWO(0x20);
private int damageBit;
Tier(int bit) {
damageBit = bit;
}
public int getDamageBit() {
return damageBit;
}
public static Tier getByDamageBit(int damageBit) {
for (Tier tier : Tier.values()) {
if (tier.damageBit == damageBit)
return tier;
}
return null;
}
}
private static PotionBrewer brewer; private static PotionBrewer brewer;
private static final int EXTENDED_BIT = 0x40; private static final int EXTENDED_BIT = 0x40;

Datei anzeigen

@ -1,26 +0,0 @@
package org.bukkit.util;
import java.lang.reflect.Array;
/**
* @deprecated Bukkit targets Java 1.6. This class will be removed in a
* subsequent release.
*/
@Deprecated
public class Java15Compat {
@SuppressWarnings("unchecked")
public static <T> T[] Arrays_copyOfRange(T[] original, int start, int end) {
if (original.length >= start && 0 <= start) {
if (start <= end) {
int length = end - start;
int copyLength = Math.min(length, original.length - start);
T[] copy = (T[]) Array.newInstance(original.getClass().getComponentType(), length);
System.arraycopy(original, start, copy, 0, copyLength);
return copy;
}
throw new IllegalArgumentException();
}
throw new ArrayIndexOutOfBoundsException();
}
}

Datei anzeigen

@ -32,9 +32,9 @@ public class DyeColorTest {
@Test @Test
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public void getByData() { public void getByData() {
byte data = dye.getData(); byte data = dye.getWoolData();
DyeColor byData = DyeColor.getByData(data); DyeColor byData = DyeColor.getByWoolData(data);
assertThat(byData, is(dye)); assertThat(byData, is(dye));
} }