diff options
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/Material.java | 36 | ||||
-rw-r--r-- | src/main/java/org/bukkit/entity/EntityType.java | 13 | ||||
-rw-r--r-- | src/main/java/org/bukkit/entity/LivingEntity.java | 41 | ||||
-rw-r--r-- | src/main/java/org/bukkit/entity/MinecartHopper.java | 7 | ||||
-rw-r--r-- | src/main/java/org/bukkit/entity/MinecartMobSpawner.java | 7 | ||||
-rw-r--r-- | src/main/java/org/bukkit/entity/MinecartTNT.java | 7 |
6 files changed, 107 insertions, 4 deletions
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java index 7d26f61e..425bc5dc 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -207,6 +207,19 @@ public enum Material { WOOD_BUTTON(143, Button.class), SKULL(144, Skull.class), ANVIL(145), + TRAPPED_CHEST(146), + GOLD_PLATE(147), + IRON_PLATE(148), + REDSTONE_COMPARATOR_OFF(149), + REDSTONE_COMPARATOR_ON(150), + DAYLIGHT_DETECTOR(151), + REDSTONE_BLOCK(152), + QUARTZ_ORE(153), + HOPPER(154), + QUARTZ_BLOCK(155), + QUARTZ_STAIRS(156, Stairs.class), + ACTIVATOR_RAIL(157), + DROPPER(158), // ----- Item Separator ----- IRON_SPADE(256, 1, 250), IRON_PICKAXE(257, 1, 250), @@ -362,6 +375,11 @@ public enum Material { FIREWORK(401), FIREWORK_CHARGE(402), ENCHANTED_BOOK(403, 1), + REDSTONE_COMPARATOR(404), + NETHER_BRICK_ITEM(405), + QUARTZ(406), + TNT_MINECART(407, 1), + HOPPER_MINECART(408, 1), GOLD_RECORD(2256, 1), GREEN_RECORD(2257, 1), RECORD_3(2258, 1), @@ -705,6 +723,16 @@ public enum Material { case BEACON: case COBBLE_WALL: case ANVIL: + case TRAPPED_CHEST: + case GOLD_PLATE: + case IRON_PLATE: + case DAYLIGHT_DETECTOR: + case REDSTONE_BLOCK: + case QUARTZ_ORE: + case HOPPER: + case QUARTZ_BLOCK: + case QUARTZ_STAIRS: + case DROPPER: return true; default: return false; @@ -760,6 +788,9 @@ public enum Material { case POTATO: case WOOD_BUTTON: case SKULL: + case REDSTONE_COMPARATOR_OFF: + case REDSTONE_COMPARATOR_ON: + case ACTIVATOR_RAIL: return true; default: return false; @@ -806,6 +837,8 @@ public enum Material { case SPRUCE_WOOD_STAIRS: case BIRCH_WOOD_STAIRS: case JUNGLE_WOOD_STAIRS: + case TRAPPED_CHEST: + case DAYLIGHT_DETECTOR: return true; default: return false; @@ -910,6 +943,9 @@ public enum Material { case EMERALD_ORE: case EMERALD_BLOCK: case COMMAND: + case QUARTZ_ORE: + case QUARTZ_BLOCK: + case DROPPER: return true; default: return false; diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java index b83a0703..5b54bfa3 100644 --- a/src/main/java/org/bukkit/entity/EntityType.java +++ b/src/main/java/org/bukkit/entity/EntityType.java @@ -70,13 +70,18 @@ public enum EntityType { FALLING_BLOCK("FallingSand", FallingBlock.class, 21, false), FIREWORK("FireworksRocketEntity", Firework.class, 22, false), /** - * A placed minecart of any type. - */ - MINECART("Minecart", Minecart.class, 40), - /** * A placed boat. */ BOAT("Boat", Boat.class, 41), + /** + * A minecart entities can ride + */ + MINECART("MinecartRideable", Minecart.class, 42), + MINECART_CHEST("MinecartChest", StorageMinecart.class, 43), + MINECART_FURNACE("MinecartFurnace", PoweredMinecart.class, 44), + MINECART_TNT("MinecartTNT", MinecartTNT.class, 45), + MINECART_HOPPER("MinecartHopper", MinecartHopper.class, 46), + MINECART_MOB_SPAWNER("MinecartMobSpawner", MinecartMobSpawner.class, 47), CREEPER("Creeper", Creeper.class, 50), SKELETON("Skeleton", Skeleton.class, 51), SPIDER("Spider", Spider.class, 52), diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java index 4a6ceb00..d82670ca 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -277,4 +277,45 @@ public interface LivingEntity extends Entity, Damageable { * @return whether or not the entity can pick up items */ public boolean getCanPickupItems(); + + /** + * Sets a custom name on a mob. This name will be used in death messages + * and can be sent to the client as a nameplate over the mob. + * <p> + * Setting the name to null or an empty string will clear it. + * <p> + * This value has no effect on players, they will always use their real + * name. + * @param name name to set + */ + public void setCustomName(String name); + + /** + * Gets the custom name on a mob. If there is no name this method will + * return null. + * <p> + * This value has no effect on players, they will always use their real + * name. + * @return name of the mob or null + */ + public String getCustomName(); + + /** + * Sets whether or not to display the mob's custom name client side. + * The name will be displayed above the mob similarly to a player. + * <p> + * This value has no effect on players, they will always display their + * name. + * @param flag show custom name + */ + public void setCustomNameVisible(boolean flag); + + /** + * Gets whether or not the mob's custom name is displayed client side. + * <p> + * This value has no effect on players, they will always display their + * name. + * @return if the custom name is displayed + */ + public boolean getCustomNameVisible(); } diff --git a/src/main/java/org/bukkit/entity/MinecartHopper.java b/src/main/java/org/bukkit/entity/MinecartHopper.java new file mode 100644 index 00000000..6781afbc --- /dev/null +++ b/src/main/java/org/bukkit/entity/MinecartHopper.java @@ -0,0 +1,7 @@ +package org.bukkit.entity; + +/** + * Represents a Minecart with a Hopper inside it + */ +public interface MinecartHopper extends Minecart { +} diff --git a/src/main/java/org/bukkit/entity/MinecartMobSpawner.java b/src/main/java/org/bukkit/entity/MinecartMobSpawner.java new file mode 100644 index 00000000..4154ab27 --- /dev/null +++ b/src/main/java/org/bukkit/entity/MinecartMobSpawner.java @@ -0,0 +1,7 @@ +package org.bukkit.entity; + +/** + * Represents a Minecart with a Mob Spawner inside it. + */ +public interface MinecartMobSpawner extends Minecart { +} diff --git a/src/main/java/org/bukkit/entity/MinecartTNT.java b/src/main/java/org/bukkit/entity/MinecartTNT.java new file mode 100644 index 00000000..cf2b8475 --- /dev/null +++ b/src/main/java/org/bukkit/entity/MinecartTNT.java @@ -0,0 +1,7 @@ +package org.bukkit.entity; + +/** + * Represents a Minecart with TNT inside it. + */ +public interface MinecartTNT extends Minecart { +} |