Added logging for dispensers removing blocks from the world

This commit is contained in:
Intelli 2024-06-17 17:51:01 -06:00
parent aa2ee7225c
commit 057a635030

View File

@ -93,7 +93,7 @@ public final class BlockDispenseListener extends Queue implements Listener {
return;
}
if (!type.equals(Material.AIR)) {
if (!type.equals(Material.AIR) || !newBlock.getType().equals(Material.AIR)) {
if (type == Material.FIRE) { // lit a lightable block
type = newBlock.getType();
if (BlockGroup.LIGHTABLES.contains(type)) {
@ -111,8 +111,13 @@ public final class BlockDispenseListener extends Queue implements Listener {
}
}
if (!type.equals(Material.AIR)) {
queueBlockPlace(user, newBlock.getState(), newBlock.getType(), blockState, type, 1, 1, null);
}
else {
Queue.queueBlockBreak(user, newBlock.getState(), newBlock.getType(), newBlock.getBlockData().getAsString(), 0);
}
}
}
}
}