mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-01-26 01:01:26 +01:00
Region hologram issue fixed.
This commit is contained in:
parent
6a7e1e53f3
commit
9af46fdece
@ -85,12 +85,14 @@ public class BlockListeners implements Listener {
|
||||
public void onSpawnerPlace(BlockPlaceEvent event) {
|
||||
Block block = event.getBlock();
|
||||
|
||||
if (block == null || block.getType() != Material.MOB_SPAWNER) return;
|
||||
if (!event.isCancelled()) {
|
||||
if (block == null || block.getType() != Material.MOB_SPAWNER) return;
|
||||
|
||||
if (!instance.spawnersEnabled()) return;
|
||||
if (!instance.spawnersEnabled()) return;
|
||||
|
||||
SpawnerStack stack = instance.getSpawnerStackManager().addSpawner(new SpawnerStack(block.getLocation(), getSpawnerAmount(event.getItemInHand())));
|
||||
instance.getHologramHandler().updateHologram(stack);
|
||||
SpawnerStack stack = instance.getSpawnerStackManager().addSpawner(new SpawnerStack(block.getLocation(), getSpawnerAmount(event.getItemInHand())));
|
||||
instance.getHologramHandler().updateHologram(stack);
|
||||
}
|
||||
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(instance, () -> instance.getHologramHandler().processChange(block), 1L);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user