mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-12-03 15:33:28 +01:00
fix remnant holograms
This commit is contained in:
parent
e17b95881a
commit
9f1ec0a8ff
@ -347,6 +347,10 @@ public class UltimateStacker extends SongodaPlugin {
|
||||
HologramManager.updateHologram(stack.getLocation(), name);
|
||||
}
|
||||
|
||||
public void removeHologram(Block block) {
|
||||
HologramManager.removeHologram(block.getLocation());
|
||||
}
|
||||
|
||||
public void updateHologram(Block block) {
|
||||
// verify that this is a spawner
|
||||
if (block.getType() != CompatibleMaterial.SPAWNER.getMaterial()) return;
|
||||
|
@ -7,6 +7,7 @@ import com.songoda.ultimatestacker.events.SpawnerPlaceEvent;
|
||||
import com.songoda.ultimatestacker.settings.Settings;
|
||||
import com.songoda.ultimatestacker.spawner.SpawnerStack;
|
||||
import com.songoda.ultimatestacker.utils.Methods;
|
||||
import java.util.ArrayList;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.block.Block;
|
||||
@ -25,6 +26,8 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.BlockStateMeta;
|
||||
|
||||
import java.util.List;
|
||||
import org.bukkit.event.block.BlockExplodeEvent;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
|
||||
public class BlockListeners implements Listener {
|
||||
|
||||
|
@ -108,7 +108,7 @@ public class EntityListeners implements Listener {
|
||||
|
||||
SpawnerStack spawnerStack = plugin.getSpawnerStackManager().removeSpawner(spawnLocation);
|
||||
plugin.getDataManager().deleteSpawner(spawnerStack);
|
||||
plugin.updateHologram(spawner);
|
||||
plugin.removeHologram(block);
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,7 +120,6 @@ public class EntityListeners implements Listener {
|
||||
ee.remove();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (Block block : toCancel) {
|
||||
|
Loading…
Reference in New Issue
Block a user