diff --git a/paper-api/src/main/java/org/bukkit/block/MobSpawner.java b/paper-api/src/main/java/org/bukkit/block/MobSpawner.java deleted file mode 100644 index b9e318387e..0000000000 --- a/paper-api/src/main/java/org/bukkit/block/MobSpawner.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.bukkit.block; - -import org.bukkit.entity.MobType; - -/** - * Represents a mob spawner. - * - * @author sk89q - * - * @deprecated Use CreatureSpawner instead. - */ -public interface MobSpawner extends BlockState { - /** - * Get the spawner's mob type. - * - * @return - */ - public MobType getMobType(); - - /** - * Set the spawner mob type. - * - * @param mobType - */ - public void setMobType(MobType mobType); - - /** - * Get the spawner's mob type. - * - * @return - */ - public String getMobTypeId(); - - /** - * Set the spawner mob type. - * - * @param mobType - */ - public void setMobTypeId(String mobType); - - /** - * Get the spawner's delay. - * - * @return - */ - public int getDelay(); - - /** - * Set the spawner's delay. - * - * @param delay - */ - public void setDelay(int delay); -} diff --git a/paper-api/src/main/java/org/bukkit/entity/MobType.java b/paper-api/src/main/java/org/bukkit/entity/MobType.java deleted file mode 100644 index 1a07f6416b..0000000000 --- a/paper-api/src/main/java/org/bukkit/entity/MobType.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.bukkit.entity; - -import java.util.EnumSet; -import java.util.HashMap; -import java.util.Map; -/** - * @deprecated Should be using CreatureType - * - */ -public enum MobType { - CHICKEN("Chicken"), - COW("Cow"), - CREEPER("Creeper"), - GHAST("Ghast"), - PIG("Pig"), - PIG_ZOMBIE("PigZombie"), - SHEEP("Sheep"), - SKELETON("Skeleton"), - SPIDER("Spider"), - ZOMBIE("Zombie"), - SQUID("Squid"), - SLIME("Slime"); - - private String name; - - private static final Map mapping - = new HashMap(); - - static { - for (MobType type : EnumSet.allOf(MobType.class)) { - mapping.put(type.name, type); - } - } - - private MobType(String name) { - this.name = name; - } - - public String getName() { - return name; - } - - public static MobType fromName(String name) { - return mapping.get(name); - } -} 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 b84b78cfd2..0f6b6e8ec7 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 @@ -1,7 +1,7 @@ package org.bukkit.event.entity; +import org.bukkit.entity.CreatureType; import org.bukkit.entity.Entity; -import org.bukkit.entity.MobType; import org.bukkit.Location; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; @@ -13,17 +13,17 @@ public class CreatureSpawnEvent extends EntityEvent implements Cancellable { private Location location; private boolean canceled; - private MobType mobtype; + private CreatureType creatureType; - public CreatureSpawnEvent(Entity spawnee, MobType mobtype, Location loc) { + public CreatureSpawnEvent(Entity spawnee, CreatureType mobtype, Location loc) { super(Event.Type.CREATURE_SPAWN, spawnee); - this.mobtype = mobtype; + this.creatureType = mobtype; this.location = loc; } - protected CreatureSpawnEvent(Event.Type type, Entity spawnee, MobType mobtype, Location loc) { + protected CreatureSpawnEvent(Event.Type type, Entity spawnee, CreatureType mobtype, Location loc) { super(type, spawnee); - this.mobtype = mobtype; + this.creatureType = mobtype; this.location = loc; } @@ -60,7 +60,7 @@ public class CreatureSpawnEvent extends EntityEvent implements Cancellable { * * @return A CreatureType value detailing the type of creature being spawned */ - public MobType getMobType() { - return mobtype; + public CreatureType getCreatureType() { + return creatureType; } } \ No newline at end of file diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java index 365e530efd..c77258d6ab 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java @@ -2,7 +2,6 @@ package org.bukkit.event.player; import org.bukkit.entity.CreatureType; import org.bukkit.entity.Egg; -import org.bukkit.entity.MobType; import org.bukkit.entity.Player; @@ -25,13 +24,6 @@ public class PlayerEggThrowEvent extends PlayerEvent { this.hatchType = hatchType; } - public PlayerEggThrowEvent(Type type, Player player, Egg egg, boolean hatching, byte numHatches, MobType hatchType) { - super(type, player); - this.egg = egg; - this.hatching = hatching; - this.numHatches = numHatches; - this.hatchType = CreatureType.fromName(hatchType.getName()); - } /** * Get the egg. * @@ -62,12 +54,12 @@ public class PlayerEggThrowEvent extends PlayerEvent { } /** - * Get the type of the mob being hatched (MobType.CHICKEN by default) + * Get the type of the mob being hatched (CreatureType.CHICKEN by default) * * @return The type of the mob being hatched by the egg */ - public MobType getHatchType() { - return MobType.fromName(hatchType.getName()); + public CreatureType getHatchType() { + return CreatureType.fromName(hatchType.getName()); } /** @@ -79,16 +71,6 @@ public class PlayerEggThrowEvent extends PlayerEvent { this.hatchType = hatchType; } - /** - * Change the type of mob being hatched by the egg - * - * @param hatchType The type of the mob being hatched by the egg - * - * @deprecated Use setHatchType(CreatureType hatchType) instead. - */ - public void setHatchType(MobType hatchType) { - this.hatchType = CreatureType.fromName(hatchType.getName()); - } /** * Get the number of mob hatches from the egg. By default the number