diff options
Diffstat (limited to 'src/main/java/org/bukkit/entity/CreatureType.java')
-rw-r--r-- | src/main/java/org/bukkit/entity/CreatureType.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/CreatureType.java b/src/main/java/org/bukkit/entity/CreatureType.java index b6a27d86..e1b32470 100644 --- a/src/main/java/org/bukkit/entity/CreatureType.java +++ b/src/main/java/org/bukkit/entity/CreatureType.java @@ -4,6 +4,11 @@ import java.util.EnumSet; import java.util.HashMap; import java.util.Map; +/** + * Represents a type of creature. + * @deprecated Use EntityType instead. + */ +@Deprecated public enum CreatureType { // These strings MUST match the strings in nms.EntityTypes and are case sensitive. CREEPER("Creeper", Creeper.class, 50), @@ -74,4 +79,13 @@ public enum CreatureType { } return ID_MAP.get((short) id); } + + @Deprecated + public EntityType toEntityType() { + return EntityType.fromName(getName()); + } + + public static CreatureType fromEntityType(EntityType creatureType) { + return fromName(creatureType.getName()); + } }
\ No newline at end of file |