Purged deprecated MobType and MobSpawner

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2011-03-07 16:29:03 +00:00
parent 188c435e67
commit de5eddce7d
4 changed files with 11 additions and 129 deletions

View File

@@ -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;
}
}

View File

@@ -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