diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java index 7bb3d43d..fd2e6ba2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java @@ -33,14 +33,15 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa spawner.mobName = creatureType.getName(); } - public void setSpawnedType(EntityType creatureType) { - if (!creatureType.isAlive() || !creatureType.isSpawnable()) { - throw new IllegalArgumentException("Can't spawn non-living entities from mob spawners!"); + public void setSpawnedType(EntityType entityType) { + if (entityType == null || entityType.getName() == null) { + throw new IllegalArgumentException("Can't spawn EntityType " + entityType + " from mobspawners!"); } - spawner.mobName = creatureType.getName(); + spawner.mobName = entityType.getName(); } + @Deprecated public String getCreatureTypeId() { return spawner.mobName; } |