diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java index a5fec06b..2d070f8e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java @@ -24,7 +24,8 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa } public EntityType getSpawnedType() { - return EntityType.fromName(spawner.getSpawner().getMobName().a()); + MinecraftKey key = spawner.getSpawner().getMobName(); + return (key == null) ? EntityType.PIG : EntityType.fromName(key.a()); } public void setSpawnedType(EntityType entityType) { |