Fix plugin not loading properly if spawner is removed while the plugin was disabled

This commit is contained in:
ceze88 2024-03-25 13:41:14 +01:00
parent e92d86a4c4
commit e730507674
1 changed files with 3 additions and 0 deletions

View File

@ -159,6 +159,9 @@ public class SpawnerStackImpl implements SpawnerStack {
return null;
}
CreatureSpawner creatureSpawner = (CreatureSpawner) this.location.getBlock().getState();
if (creatureSpawner.getSpawnedType() == null) {
return null;
}
return Methods.compileSpawnerName(creatureSpawner.getSpawnedType(), this.amount);
}