mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-01-27 01:31:20 +01:00
Fix plugin not loading properly if spawner is removed while the plugin was disabled
This commit is contained in:
parent
e92d86a4c4
commit
e730507674
@ -159,6 +159,9 @@ public class SpawnerStackImpl implements SpawnerStack {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
CreatureSpawner creatureSpawner = (CreatureSpawner) this.location.getBlock().getState();
|
CreatureSpawner creatureSpawner = (CreatureSpawner) this.location.getBlock().getState();
|
||||||
|
if (creatureSpawner.getSpawnedType() == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return Methods.compileSpawnerName(creatureSpawner.getSpawnedType(), this.amount);
|
return Methods.compileSpawnerName(creatureSpawner.getSpawnedType(), this.amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user