mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-12-31 21:07:47 +01:00
Check to see if a spawner has been illegally removed.
This commit is contained in:
parent
b9e9885fe1
commit
48d329b2fe
@ -342,8 +342,10 @@ public class UltimateStacker extends SongodaPlugin {
|
||||
public void updateHologram(SpawnerStack stack) {
|
||||
// are holograms enabled?
|
||||
if(!Settings.SPAWNER_HOLOGRAMS.getBoolean() || !HologramManager.getManager().isEnabled()) return;
|
||||
Block block = stack.getLocation().getBlock();
|
||||
if (block.getType() != CompatibleMaterial.SPAWNER.getBlockMaterial()) return;
|
||||
// grab the spawner block
|
||||
CreatureSpawner creatureSpawner = (CreatureSpawner) stack.getLocation().getBlock().getState();
|
||||
CreatureSpawner creatureSpawner = (CreatureSpawner) block.getState();
|
||||
String name = Methods.compileSpawnerName(creatureSpawner.getSpawnedType(), stack.getAmount());
|
||||
// create the hologram
|
||||
HologramManager.updateHologram(stack.getLocation(), name);
|
||||
|
Loading…
Reference in New Issue
Block a user