mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-12-26 02:17:38 +01:00
hologram fix.
This commit is contained in:
parent
66813c9a59
commit
26a75b52f3
@ -71,7 +71,8 @@ public class BlockListeners implements Listener {
|
||||
}
|
||||
|
||||
stack.setAmount(stack.getAmount() + itemAmount);
|
||||
instance.getHologramHandler().updateHologram(stack);
|
||||
if (instance.getHologramHandler() != null)
|
||||
instance.getHologramHandler().updateHologram(stack);
|
||||
Methods.takeItem(player, itemAmount);
|
||||
}
|
||||
}
|
||||
@ -125,11 +126,13 @@ public class BlockListeners implements Listener {
|
||||
} else {
|
||||
if (stack.getAmount() <= 1) {
|
||||
event.setCancelled(false);
|
||||
if (instance.getHologramHandler() != null)
|
||||
instance.getHologramHandler().despawn(block);
|
||||
instance.getSpawnerStackManager().removeSpawner(block.getLocation());
|
||||
} else {
|
||||
stack.setAmount(stack.getAmount() - 1);
|
||||
instance.getHologramHandler().updateHologram(stack);
|
||||
if (instance.getHologramHandler() != null)
|
||||
instance.getHologramHandler().updateHologram(stack);
|
||||
}
|
||||
}
|
||||
if (player.hasPermission("ultimatestacker.spawner.nosilkdrop") || item != null && item.getEnchantments().containsKey(Enchantment.SILK_TOUCH) && player.hasPermission("ultimatestacker.spawner.silktouch"))
|
||||
|
Loading…
Reference in New Issue
Block a user