* 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
- * guarantee values will not be removed from this Enum. As such, you should
- * not depend on the ordinal values of this class.
+ * guarantee values will not be removed from this Enum. As such, you should not
+ * depend on the ordinal values of this class.
*/
public enum Sound {
AMBIENT_CAVE,
@@ -94,6 +94,8 @@ public enum Sound {
BLOCK_SAND_HIT,
BLOCK_SAND_PLACE,
BLOCK_SAND_STEP,
+ BLOCK_SHULKER_BOX_CLOSE,
+ BLOCK_SHULKER_BOX_OPEN,
BLOCK_SLIME_BREAK,
BLOCK_SLIME_FALL,
BLOCK_SLIME_HIT,
@@ -182,6 +184,7 @@ public enum Sound {
ENTITY_ELDER_GUARDIAN_CURSE,
ENTITY_ELDER_GUARDIAN_DEATH,
ENTITY_ELDER_GUARDIAN_DEATH_LAND,
+ ENTITY_ELDER_GUARDIAN_FLOP,
ENTITY_ELDER_GUARDIAN_HURT,
ENTITY_ELDER_GUARDIAN_HURT_LAND,
ENTITY_ENDERDRAGON_AMBIENT,
@@ -203,9 +206,16 @@ public enum Sound {
ENTITY_ENDERMITE_HURT,
ENTITY_ENDERMITE_STEP,
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_ORB_PICKUP,
- ENTITY_EXPERIENCE_ORB_TOUCH,
ENTITY_FIREWORK_BLAST,
ENTITY_FIREWORK_BLAST_FAR,
ENTITY_FIREWORK_LARGE_BLAST,
@@ -278,6 +288,15 @@ public enum Sound {
ENTITY_LIGHTNING_IMPACT,
ENTITY_LIGHTNING_THUNDER,
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_HURT,
ENTITY_MAGMACUBE_JUMP,
@@ -286,6 +305,7 @@ public enum Sound {
ENTITY_MINECART_RIDING,
ENTITY_MOOSHROOM_SHEAR,
ENTITY_MULE_AMBIENT,
+ ENTITY_MULE_CHEST,
ENTITY_MULE_DEATH,
ENTITY_MULE_HURT,
ENTITY_PAINTING_BREAK,
@@ -379,12 +399,19 @@ public enum Sound {
ENTITY_STRAY_HURT,
ENTITY_STRAY_STEP,
ENTITY_TNT_PRIMED,
+ ENTITY_VEX_AMBIENT,
+ ENTITY_VEX_CHARGE,
+ ENTITY_VEX_DEATH,
+ ENTITY_VEX_HURT,
ENTITY_VILLAGER_AMBIENT,
ENTITY_VILLAGER_DEATH,
ENTITY_VILLAGER_HURT,
ENTITY_VILLAGER_NO,
ENTITY_VILLAGER_TRADING,
ENTITY_VILLAGER_YES,
+ ENTITY_VINDICATION_ILLAGER_AMBIENT,
+ ENTITY_VINDICATION_ILLAGER_DEATH,
+ ENTITY_VINDICATION_ILLAGER_HURT,
ENTITY_WITCH_AMBIENT,
ENTITY_WITCH_DEATH,
ENTITY_WITCH_DRINK,
@@ -432,10 +459,12 @@ public enum Sound {
ENTITY_ZOMBIE_VILLAGER_STEP,
ITEM_ARMOR_EQUIP_CHAIN,
ITEM_ARMOR_EQUIP_DIAMOND,
+ ITEM_ARMOR_EQUIP_ELYTRA,
ITEM_ARMOR_EQUIP_GENERIC,
ITEM_ARMOR_EQUIP_GOLD,
ITEM_ARMOR_EQUIP_IRON,
ITEM_ARMOR_EQUIP_LEATHER,
+ ITEM_BOTTLE_EMPTY,
ITEM_BOTTLE_FILL,
ITEM_BOTTLE_FILL_DRAGONBREATH,
ITEM_BUCKET_EMPTY,
@@ -450,6 +479,7 @@ public enum Sound {
ITEM_SHIELD_BLOCK,
ITEM_SHIELD_BREAK,
ITEM_SHOVEL_FLATTEN,
+ ITEM_TOTEM_USE,
MUSIC_CREATIVE,
MUSIC_CREDITS,
MUSIC_DRAGON,
diff --git a/paper-api/src/main/java/org/bukkit/Statistic.java b/paper-api/src/main/java/org/bukkit/Statistic.java
index 3f0ec9f55f..a23397f583 100644
--- a/paper-api/src/main/java/org/bukkit/Statistic.java
+++ b/paper-api/src/main/java/org/bukkit/Statistic.java
@@ -61,7 +61,8 @@ public enum Statistic {
FURNACE_INTERACTION,
CRAFTING_TABLE_INTERACTION,
CHEST_OPENED,
- SLEEP_IN_BED;
+ SLEEP_IN_BED,
+ SHULKER_BOX_OPENED;
private final Type type;
diff --git a/paper-api/src/main/java/org/bukkit/block/ShulkerBox.java b/paper-api/src/main/java/org/bukkit/block/ShulkerBox.java
new file mode 100644
index 0000000000..c58711ced5
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/block/ShulkerBox.java
@@ -0,0 +1,8 @@
+package org.bukkit.block;
+
+import org.bukkit.inventory.InventoryHolder;
+
+/**
+ * Represents a ShulkerBox.
+ */
+public interface ShulkerBox extends BlockState, InventoryHolder, Lockable { }
diff --git a/paper-api/src/main/java/org/bukkit/command/Command.java b/paper-api/src/main/java/org/bukkit/command/Command.java
index 00264b57d8..7adc6ee9ef 100644
--- a/paper-api/src/main/java/org/bukkit/command/Command.java
+++ b/paper-api/src/main/java/org/bukkit/command/Command.java
@@ -57,21 +57,6 @@ public abstract class Command {
*/
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
+ * 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.
+ *
+ * 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.
+ *
+ * Setting the domestication level to a high value will increase the
+ * horse's chances of becoming tame.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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);
+}
diff --git a/paper-api/src/main/java/org/bukkit/entity/ChestedHorse.java b/paper-api/src/main/java/org/bukkit/entity/ChestedHorse.java
new file mode 100644
index 0000000000..24780af641
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/ChestedHorse.java
@@ -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);
+}
diff --git a/paper-api/src/main/java/org/bukkit/entity/Donkey.java b/paper-api/src/main/java/org/bukkit/entity/Donkey.java
new file mode 100644
index 0000000000..b554e33097
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/Donkey.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents a Donkey - variant of {@link ChestedHorse}.
+ */
+public interface Donkey extends ChestedHorse { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/ElderGuardian.java b/paper-api/src/main/java/org/bukkit/entity/ElderGuardian.java
new file mode 100644
index 0000000000..5ca1d4c9f2
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/ElderGuardian.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents an ElderGuardian - variant of {@link Guardian}.
+ */
+public interface ElderGuardian extends Guardian { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/EntityType.java b/paper-api/src/main/java/org/bukkit/entity/EntityType.java
index 028e1f2e57..c79a003534 100644
--- a/paper-api/src/main/java/org/bukkit/entity/EntityType.java
+++ b/paper-api/src/main/java/org/bukkit/entity/EntityType.java
@@ -24,172 +24,225 @@ public enum EntityType {
* Spawn with {@link World#dropItem(Location, ItemStack)} or {@link
* World#dropItemNaturally(Location, ItemStack)}
*/
- DROPPED_ITEM("Item", Item.class, 1, false),
+ DROPPED_ITEM("item", Item.class, 1, false),
/**
* 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.
*/
- LEASH_HITCH("LeashKnot", LeashHitch.class, 8),
+ LEASH_HITCH("leash_knot", LeashHitch.class, 8),
/**
* A painting on a wall.
*/
- PAINTING("Painting", Painting.class, 9),
+ PAINTING("painting", Painting.class, 9),
/**
* An arrow projectile; may get stuck in the ground.
*/
- ARROW("Arrow", Arrow.class, 10),
+ ARROW("arrow", Arrow.class, 10),
/**
* A flying snowball.
*/
- SNOWBALL("Snowball", Snowball.class, 11),
+ SNOWBALL("snowball", Snowball.class, 11),
/**
* 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.
*/
- SMALL_FIREBALL("SmallFireball", SmallFireball.class, 13),
+ SMALL_FIREBALL("small_fireball", SmallFireball.class, 13),
/**
* A flying ender pearl.
*/
- ENDER_PEARL("ThrownEnderpearl", EnderPearl.class, 14),
+ ENDER_PEARL("ender_pearl", EnderPearl.class, 14),
/**
* 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.
*/
- THROWN_EXP_BOTTLE("ThrownExpBottle", ThrownExpBottle.class, 17),
+ THROWN_EXP_BOTTLE("xp_bottle", ThrownExpBottle.class, 17),
/**
* An item frame on a wall.
*/
- ITEM_FRAME("ItemFrame", ItemFrame.class, 18),
+ ITEM_FRAME("item_frame", ItemFrame.class, 18),
/**
* 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("PrimedTnt", TNTPrimed.class, 20),
+ PRIMED_TNT("tnt", TNTPrimed.class, 20),
/**
* 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.
*/
- 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.
*/
- SPECTRAL_ARROW("SpectralArrow", SpectralArrow.class, 24),
+ SPECTRAL_ARROW("spectral_arrow", SpectralArrow.class, 24),
/**
* 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.
*/
- 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.
*/
- 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
*/
- MINECART_COMMAND("MinecartCommandBlock", CommandMinecart.class, 40),
+ MINECART_COMMAND("commandblock_minecart", CommandMinecart.class, 40),
/**
* A placed boat.
*/
- BOAT("Boat", Boat.class, 41),
+ BOAT("boat", Boat.class, 41),
/**
* @see RideableMinecart
*/
- MINECART("MinecartRideable", RideableMinecart.class, 42),
+ MINECART("minecart", RideableMinecart.class, 42),
/**
* @see StorageMinecart
*/
- MINECART_CHEST("MinecartChest", StorageMinecart.class, 43),
+ MINECART_CHEST("chest_minecart", StorageMinecart.class, 43),
/**
* @see PoweredMinecart
*/
- MINECART_FURNACE("MinecartFurnace", PoweredMinecart.class, 44),
+ MINECART_FURNACE("chest_minecart", PoweredMinecart.class, 44),
/**
* @see ExplosiveMinecart
*/
- MINECART_TNT("MinecartTNT", ExplosiveMinecart.class, 45),
+ MINECART_TNT("tnt_minecart", ExplosiveMinecart.class, 45),
/**
* @see HopperMinecart
*/
- MINECART_HOPPER("MinecartHopper", HopperMinecart.class, 46),
+ MINECART_HOPPER("hopper_minecart", HopperMinecart.class, 46),
/**
* @see SpawnerMinecart
*/
- MINECART_MOB_SPAWNER("MinecartMobSpawner", SpawnerMinecart.class, 47),
- CREEPER("Creeper", Creeper.class, 50),
- SKELETON("Skeleton", Skeleton.class, 51),
- SPIDER("Spider", Spider.class, 52),
- GIANT("Giant", Giant.class, 53),
- ZOMBIE("Zombie", Zombie.class, 54),
- SLIME("Slime", Slime.class, 55),
- GHAST("Ghast", Ghast.class, 56),
- PIG_ZOMBIE("PigZombie", PigZombie.class, 57),
- ENDERMAN("Enderman", Enderman.class, 58),
- CAVE_SPIDER("CaveSpider", CaveSpider.class, 59),
- SILVERFISH("Silverfish", Silverfish.class, 60),
- BLAZE("Blaze", Blaze.class, 61),
- MAGMA_CUBE("LavaSlime", MagmaCube.class, 62),
- ENDER_DRAGON("EnderDragon", EnderDragon.class, 63),
- 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),
- SHULKER("Shulker", Shulker.class, 69),
- PIG("Pig", Pig.class, 90),
- SHEEP("Sheep", Sheep.class, 91),
- COW("Cow", Cow.class, 92),
- CHICKEN("Chicken", Chicken.class, 93),
- SQUID("Squid", Squid.class, 94),
- WOLF("Wolf", Wolf.class, 95),
- MUSHROOM_COW("MushroomCow", MushroomCow.class, 96),
- SNOWMAN("SnowMan", Snowman.class, 97),
- OCELOT("Ozelot", Ocelot.class, 98),
- IRON_GOLEM("VillagerGolem", IronGolem.class, 99),
- HORSE("EntityHorse", Horse.class, 100),
- RABBIT("Rabbit", Rabbit.class, 101),
- POLAR_BEAR("PolarBear", PolarBear.class, 102),
- VILLAGER("Villager", Villager.class, 120),
- ENDER_CRYSTAL("EnderCrystal", EnderCrystal.class, 200),
+ MINECART_MOB_SPAWNER("spawner_minecart", SpawnerMinecart.class, 47),
+ CREEPER("creeper", Creeper.class, 50),
+ SKELETON("skeleton", Skeleton.class, 51),
+ SPIDER("spider", Spider.class, 52),
+ GIANT("giant", Giant.class, 53),
+ ZOMBIE("zombie", Zombie.class, 54),
+ SLIME("slime", Slime.class, 55),
+ GHAST("ghast", Ghast.class, 56),
+ PIG_ZOMBIE("zombie_pigman", PigZombie.class, 57),
+ ENDERMAN("enderman", Enderman.class, 58),
+ CAVE_SPIDER("cave_spider", CaveSpider.class, 59),
+ SILVERFISH("silverfish", Silverfish.class, 60),
+ BLAZE("blaze", Blaze.class, 61),
+ MAGMA_CUBE("magma_cube", MagmaCube.class, 62),
+ ENDER_DRAGON("ender_dragon", EnderDragon.class, 63),
+ WITHER("wither", Wither.class, 64),
+ BAT("bat", Bat.class, 65),
+ WITCH("witch", Witch.class, 66),
+ ENDERMITE("endermite", Endermite.class, 67),
+ GUARDIAN("guardian", Guardian.class, 68),
+ SHULKER("shulker", Shulker.class, 69),
+ PIG("pig", Pig.class, 90),
+ SHEEP("sheep", Sheep.class, 91),
+ COW("cow", Cow.class, 92),
+ CHICKEN("chicken", Chicken.class, 93),
+ SQUID("squid", Squid.class, 94),
+ WOLF("wolf", Wolf.class, 95),
+ MUSHROOM_COW("mooshroom", MushroomCow.class, 96),
+ SNOWMAN("snowman", Snowman.class, 97),
+ OCELOT("ocelot", Ocelot.class, 98),
+ IRON_GOLEM("villager_golem", IronGolem.class, 99),
+ HORSE("horse", Horse.class, 100),
+ RABBIT("rabbit", Rabbit.class, 101),
+ POLAR_BEAR("polar_bear", PolarBear.class, 102),
+ LLAMA("llama", Llama.class, 103),
+ 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.
- /**
- * A flying splash potion
- */
- SPLASH_POTION(null, SplashPotion.class, -1, false),
/**
* A flying lingering potion
*/
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.
*/
- FISHING_HOOK(null, Fish.class, -1, false),
+ FISHING_HOOK(null, FishHook.class, -1, false),
/**
* A bolt of lightning.
*
@@ -199,6 +252,11 @@ public enum EntityType {
WEATHER(null, Weather.class, -1, false),
PLAYER(null, Player.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
*/
diff --git a/paper-api/src/main/java/org/bukkit/entity/Evoker.java b/paper-api/src/main/java/org/bukkit/entity/Evoker.java
new file mode 100644
index 0000000000..4b7fd3aebb
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/Evoker.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents an Evoker.
+ */
+public interface Evoker extends Monster { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/EvokerFangs.java b/paper-api/src/main/java/org/bukkit/entity/EvokerFangs.java
new file mode 100644
index 0000000000..e82e3966bc
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/EvokerFangs.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents Evoker Fangs.
+ */
+public interface EvokerFangs extends Entity { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/FallingSand.java b/paper-api/src/main/java/org/bukkit/entity/FallingSand.java
deleted file mode 100644
index 758d47dbd4..0000000000
--- a/paper-api/src/main/java/org/bukkit/entity/FallingSand.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.bukkit.entity;
-
-/**
- * Represents a falling block.
- *
- * @deprecated See {@link FallingBlock}
- */
-@Deprecated
-public interface FallingSand extends FallingBlock {}
diff --git a/paper-api/src/main/java/org/bukkit/entity/Guardian.java b/paper-api/src/main/java/org/bukkit/entity/Guardian.java
index 39d8a8929c..98af0563c6 100644
--- a/paper-api/src/main/java/org/bukkit/entity/Guardian.java
+++ b/paper-api/src/main/java/org/bukkit/entity/Guardian.java
@@ -6,16 +6,14 @@ public interface Guardian extends Monster {
* Check if the Guardian is an elder Guardian
*
* @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
public boolean isElder();
/**
- * Set the Guardian to an elder Guardian or not
- *
- * @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
+ * @param shouldBeElder
+ * @deprecated Must spawn a new {@link ElderGuardian}.
*/
@Deprecated
public void setElder(boolean shouldBeElder);
diff --git a/paper-api/src/main/java/org/bukkit/entity/Horse.java b/paper-api/src/main/java/org/bukkit/entity/Horse.java
index 1c6b2815de..a280ab2c22 100644
--- a/paper-api/src/main/java/org/bukkit/entity/Horse.java
+++ b/paper-api/src/main/java/org/bukkit/entity/Horse.java
@@ -1,18 +1,16 @@
package org.bukkit.entity;
import org.bukkit.inventory.HorseInventory;
-import org.bukkit.inventory.InventoryHolder;
/**
* Represents a Horse.
- * @deprecated Entity subtypes will be separate entities in a future Minecraft release
*/
-@Deprecated
-public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable {
+public interface Horse extends AbstractHorse {
/**
- * Represents the different types of horses that may exist.
+ * @deprecated different variants are differing classes
*/
+ @Deprecated
public enum Variant {
/**
* A normal horse
@@ -34,6 +32,10 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable {
* A 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.
- *
- * 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.
- *
- * 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.
- *
- * 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.
*
@@ -173,90 +144,19 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable {
public void setStyle(Style style);
/**
- * Gets whether the horse has a chest equipped.
- *
- * @return true if the horse has chest storage
+ * @return
+ * @deprecated see {@link ChestedHorse}
*/
+ @Deprecated
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
+ * @param chest
+ * @deprecated see {@link ChestedHorse}
*/
+ @Deprecated
public void setCarryingChest(boolean chest);
- /**
- * Gets the domestication level of this horse.
- *
- * 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.
- *
- * Setting the domestication level to a high value will increase the
- * horse's chances of becoming tame.
- *
- * 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.
- *
- * 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.
- *
- * 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.
- *
- * 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.
- *
- * 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.
- *
- * 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
public HorseInventory getInventory();
}
diff --git a/paper-api/src/main/java/org/bukkit/entity/Husk.java b/paper-api/src/main/java/org/bukkit/entity/Husk.java
new file mode 100644
index 0000000000..17139a2e78
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/Husk.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents a Husk - variant of {@link Zombie}.
+ */
+public interface Husk extends Zombie { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/Llama.java b/paper-api/src/main/java/org/bukkit/entity/Llama.java
new file mode 100644
index 0000000000..fc574e49b4
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/Llama.java
@@ -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();
+}
diff --git a/paper-api/src/main/java/org/bukkit/entity/LlamaSpit.java b/paper-api/src/main/java/org/bukkit/entity/LlamaSpit.java
new file mode 100644
index 0000000000..9890dffe73
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/LlamaSpit.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents Llama spit.
+ */
+public interface LlamaSpit extends Projectile { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/Mule.java b/paper-api/src/main/java/org/bukkit/entity/Mule.java
new file mode 100644
index 0000000000..4f5efb36b0
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/Mule.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents a Mule - variant of {@link ChestedHorse}.
+ */
+public interface Mule extends ChestedHorse { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/PoweredMinecart.java b/paper-api/src/main/java/org/bukkit/entity/PoweredMinecart.java
deleted file mode 100644
index 38240a90fc..0000000000
--- a/paper-api/src/main/java/org/bukkit/entity/PoweredMinecart.java
+++ /dev/null
@@ -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 {}
diff --git a/paper-api/src/main/java/org/bukkit/entity/Skeleton.java b/paper-api/src/main/java/org/bukkit/entity/Skeleton.java
index 4f6e36b9bc..2a02ab855e 100644
--- a/paper-api/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/paper-api/src/main/java/org/bukkit/entity/Skeleton.java
@@ -9,23 +9,21 @@ public interface Skeleton extends Monster {
* Gets the current type of this skeleton.
*
* @return Current type
- * @deprecated Entity subtypes will be separate entities in a future Minecraft release
+ * @deprecated should check what class instance this is
*/
@Deprecated
public SkeletonType getSkeletonType();
/**
- * Sets the new type of this skeleton.
- *
- * @param type New type
- * @deprecated Entity subtypes will be separate entities in a future Minecraft release
+ * @deprecated Must spawn a new subtype variant
*/
@Deprecated
public void setSkeletonType(SkeletonType type);
/*
- * Represents the various different Skeleton types.
+ * @deprecated classes are different types
*/
+ @Deprecated
public enum SkeletonType {
/**
diff --git a/paper-api/src/main/java/org/bukkit/entity/SkeletonHorse.java b/paper-api/src/main/java/org/bukkit/entity/SkeletonHorse.java
new file mode 100644
index 0000000000..b2c6b6a868
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/SkeletonHorse.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents a SkeletonHorse - variant of {@link AbstractHorse}.
+ */
+public interface SkeletonHorse extends AbstractHorse { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/StorageMinecart.java b/paper-api/src/main/java/org/bukkit/entity/StorageMinecart.java
deleted file mode 100644
index 5436d708b4..0000000000
--- a/paper-api/src/main/java/org/bukkit/entity/StorageMinecart.java
+++ /dev/null
@@ -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 {}
diff --git a/paper-api/src/main/java/org/bukkit/entity/Stray.java b/paper-api/src/main/java/org/bukkit/entity/Stray.java
new file mode 100644
index 0000000000..9c83f98e91
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/Stray.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents a Stray - variant of {@link Skeleton}.
+ */
+public interface Stray extends Skeleton { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/Vex.java b/paper-api/src/main/java/org/bukkit/entity/Vex.java
new file mode 100644
index 0000000000..a2f2fcaec8
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/Vex.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents a Vex.
+ */
+public interface Vex extends Monster { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/Vindicator.java b/paper-api/src/main/java/org/bukkit/entity/Vindicator.java
new file mode 100644
index 0000000000..47fd24f38b
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/Vindicator.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents a Vindicator.
+ */
+public interface Vindicator extends Monster { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/WitherSkeleton.java b/paper-api/src/main/java/org/bukkit/entity/WitherSkeleton.java
new file mode 100644
index 0000000000..7045014e60
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/WitherSkeleton.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents a WitherSkeleton - variant of {@link Skeleton}.
+ */
+public interface WitherSkeleton extends Skeleton { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/Zombie.java b/paper-api/src/main/java/org/bukkit/entity/Zombie.java
index 420eaa4389..4deaaff85a 100644
--- a/paper-api/src/main/java/org/bukkit/entity/Zombie.java
+++ b/paper-api/src/main/java/org/bukkit/entity/Zombie.java
@@ -23,35 +23,28 @@ public interface Zombie extends Monster {
* Gets 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
public boolean isVillager();
/**
- * Sets whether the zombie is a villager
- *
- * @param flag Whether the zombie is a villager
- * @deprecated Entity subtypes will be separate entities in a future Minecraft release
+ * @param flag
+ * @deprecated must spawn {@link ZombieVillager}.
*/
@Deprecated
public void setVillager(boolean flag);
/**
- * Sets whether the zombie is a villager
- *
- * @param profession the profession of the villager or null to clear
- * @deprecated Entity subtypes will be separate entities in a future Minecraft release
+ * @param profession
+ * @see ZombieVillager#getVillagerProfession()
*/
@Deprecated
public void setVillagerProfession(Villager.Profession profession);
/**
- * Returns the villager profession of the zombie if the
- * zombie is a villager
- *
- * @return the profession or null
- * @deprecated Entity subtypes will be separate entities in a future Minecraft release
+ * @return
+ * @see ZombieVillager#getVillagerProfession()
*/
@Deprecated
public Villager.Profession getVillagerProfession();
diff --git a/paper-api/src/main/java/org/bukkit/entity/ZombieHorse.java b/paper-api/src/main/java/org/bukkit/entity/ZombieHorse.java
new file mode 100644
index 0000000000..4179b68bdb
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/ZombieHorse.java
@@ -0,0 +1,6 @@
+package org.bukkit.entity;
+
+/**
+ * Represents a ZombieHorse - variant of {@link AbstractHorse}.
+ */
+public interface ZombieHorse extends AbstractHorse { }
diff --git a/paper-api/src/main/java/org/bukkit/entity/ZombieVillager.java b/paper-api/src/main/java/org/bukkit/entity/ZombieVillager.java
new file mode 100644
index 0000000000..f6ab96c8c9
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/entity/ZombieVillager.java
@@ -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();
+}
diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java b/paper-api/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java
index 5ea8b07fd1..3c85866e43 100644
--- a/paper-api/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java
@@ -19,11 +19,6 @@ public class BlockIgniteEvent extends BlockEvent implements Cancellable {
private final Block ignitingBlock;
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) {
this(theBlock, cause, ignitingEntity, null);
}
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
index 45cfe4f660..361e0df34c 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
@@ -96,13 +96,6 @@ public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
* When a creature spawns because of a lightning strike
*/
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
*/
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java
index 41be9ca951..9f69ded62f 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java
@@ -3,7 +3,6 @@ package org.bukkit.event.entity;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
-import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
@@ -17,19 +16,6 @@ public class EntityChangeBlockEvent extends EntityEvent implements Cancellable {
private final Material to;
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
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java
index 2ff121e3c5..31c6a01201 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java
@@ -12,11 +12,6 @@ import org.bukkit.entity.Entity;
public class EntityDamageByBlockEvent extends EntityDamageEvent {
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
public EntityDamageByBlockEvent(final Block damager, final Entity damagee, final DamageCause cause, final double damage) {
super(damagee, cause, damage);
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java
index 49e74c3037..f121786adf 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java
@@ -11,11 +11,6 @@ import org.bukkit.entity.Entity;
public class EntityDamageByEntityEvent extends EntityDamageEvent {
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
public EntityDamageByEntityEvent(final Entity damager, final Entity damagee, final DamageCause cause, final double damage) {
super(damagee, cause, damage);
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java
index 0201d597bd..d0e66c6d98 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java
@@ -28,11 +28,6 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
private boolean cancelled;
private final DamageCause cause;
- @Deprecated
- public EntityDamageEvent(final Entity damagee, final DamageCause cause, final int damage) {
- this(damagee, cause, (double) damage);
- }
-
@Deprecated
public EntityDamageEvent(final Entity damagee, final DamageCause cause, final double damage) {
this(damagee, cause, new EnumMap
* Damage: 1
*/
- HOT_FLOOR
+ HOT_FLOOR,
+ /**
+ * Damage caused when an entity is colliding with too many entities due
+ * to the maxEntityCramming game rule.
+ *
+ * Damage: 6
+ */
+ CRAMMING
}
}
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
index a7b3517aa6..c7e9ba6ffb 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
@@ -14,11 +14,6 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
private double amount;
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) {
super(entity);
this.amount = amount;
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityResurrectEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityResurrectEvent.java
new file mode 100644
index 0000000000..17cd6657f7
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityResurrectEvent.java
@@ -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;
+ }
+}
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/HorseJumpEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/HorseJumpEvent.java
index 21ebab6e5e..1794913683 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/HorseJumpEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/HorseJumpEvent.java
@@ -1,8 +1,8 @@
package org.bukkit.event.entity;
-import org.bukkit.entity.Horse;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
+import org.bukkit.entity.AbstractHorse;
/**
* Called when a horse jumps.
@@ -12,7 +12,7 @@ public class HorseJumpEvent extends EntityEvent implements Cancellable {
private boolean cancelled;
private float power;
- public HorseJumpEvent(final Horse horse, final float power) {
+ public HorseJumpEvent(final AbstractHorse horse, final float power) {
super(horse);
this.power = power;
}
@@ -30,8 +30,8 @@ public class HorseJumpEvent extends EntityEvent implements Cancellable {
}
@Override
- public Horse getEntity() {
- return (Horse) entity;
+ public AbstractHorse getEntity() {
+ 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
* how much of its jumping capability will be used in this jump. To set
* the horse's overall jump strength, see {@link
- * Horse#setJumpStrength(double)}.
+ * AbstractHorse#setJumpStrength(double)}.
*
* @return jump strength
*/
diff --git a/paper-api/src/main/java/org/bukkit/event/inventory/CraftItemEvent.java b/paper-api/src/main/java/org/bukkit/event/inventory/CraftItemEvent.java
index ba3f5e5f10..dafaf41e34 100644
--- a/paper-api/src/main/java/org/bukkit/event/inventory/CraftItemEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/inventory/CraftItemEvent.java
@@ -11,11 +11,6 @@ import org.bukkit.inventory.Recipe;
public class CraftItemEvent extends InventoryClickEvent {
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) {
super(what, type, slot, click, action);
this.recipe = recipe;
diff --git a/paper-api/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java b/paper-api/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
index 28198b8b0f..55527652af 100644
--- a/paper-api/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
@@ -53,11 +53,6 @@ public class InventoryClickEvent extends InventoryInteractEvent {
private ItemStack current = null;
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) {
super(view);
this.slot_type = type;
diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java
index 1ec817325d..a128e2055f 100644
--- a/paper-api/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java
@@ -49,7 +49,6 @@ public class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancell
private static final HandlerList handlers = new HandlerList();
private boolean cancel = false;
private String message;
- private String format = "<%1$s> %2$s";
private final Set
diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerFishEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerFishEvent.java
index 4d6b29ada1..72eebe9660 100644
--- a/paper-api/src/main/java/org/bukkit/event/player/PlayerFishEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerFishEvent.java
@@ -17,18 +17,6 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable {
private final State state;
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) {
super(player);
this.entity = entity;
diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerInventoryEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerInventoryEvent.java
deleted file mode 100644
index 2ec69d783f..0000000000
--- a/paper-api/src/main/java/org/bukkit/event/player/PlayerInventoryEvent.java
+++ /dev/null
@@ -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;
- }
-}
diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
index 68834dddc7..8b012ea9b7 100644
--- a/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
@@ -15,25 +15,6 @@ public class PlayerLoginEvent extends PlayerEvent {
private Result result = Result.ALLOWED;
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
* ALLOWED
@@ -49,18 +30,6 @@ public class PlayerLoginEvent extends PlayerEvent {
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
*
diff --git a/paper-api/src/main/java/org/bukkit/inventory/LlamaInventory.java b/paper-api/src/main/java/org/bukkit/inventory/LlamaInventory.java
new file mode 100644
index 0000000000..406fb18fde
--- /dev/null
+++ b/paper-api/src/main/java/org/bukkit/inventory/LlamaInventory.java
@@ -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);
+}
diff --git a/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java b/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java
index fb5c297066..4dbe95d562 100644
--- a/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java
+++ b/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java
@@ -19,5 +19,29 @@ public interface MapMeta extends ItemMeta {
*/
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.
+ *
+ * Plugins should check that hasLocationName() returns
- * 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) {
final ClassLoader classLoader = this.getClass().getClassLoader();
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) {
this.loader = loader;
@@ -361,18 +323,6 @@ public abstract class JavaPlugin extends PluginBase {
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}
*/
diff --git a/paper-api/src/main/java/org/bukkit/potion/Potion.java b/paper-api/src/main/java/org/bukkit/potion/Potion.java
index 28d24f6b46..7aa5a2d1a0 100644
--- a/paper-api/src/main/java/org/bukkit/potion/Potion.java
+++ b/paper-api/src/main/java/org/bukkit/potion/Potion.java
@@ -33,33 +33,6 @@ public class Potion {
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.
*
@@ -192,17 +165,6 @@ public class Potion {
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.
*
@@ -261,18 +223,6 @@ public class Potion {
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.
*
@@ -326,30 +276,6 @@ public class Potion {
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 final int EXTENDED_BIT = 0x40;
diff --git a/paper-api/src/main/java/org/bukkit/util/Java15Compat.java b/paper-api/src/main/java/org/bukkit/util/Java15Compat.java
deleted file mode 100644
index dc14e8a586..0000000000
--- a/paper-api/src/main/java/org/bukkit/util/Java15Compat.java
+++ /dev/null
@@ -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 true
+ * 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();
}
diff --git a/paper-api/src/main/java/org/bukkit/map/MapView.java b/paper-api/src/main/java/org/bukkit/map/MapView.java
index 65c415962a..18a9936f13 100644
--- a/paper-api/src/main/java/org/bukkit/map/MapView.java
+++ b/paper-api/src/main/java/org/bukkit/map/MapView.java
@@ -154,4 +154,19 @@ public interface MapView {
*/
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);
}
diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
index d9757bf836..bcb8a67997 100644
--- a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
+++ b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
@@ -67,27 +67,6 @@ public abstract class JavaPlugin extends PluginBase {
((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.
- *