Added logging for dispensers removing blocks from the world
This commit is contained in:
parent
aa2ee7225c
commit
057a635030
1 changed files with 7 additions and 2 deletions
|
|
@ -93,7 +93,7 @@ public final class BlockDispenseListener extends Queue implements Listener {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!type.equals(Material.AIR)) {
|
if (!type.equals(Material.AIR) || !newBlock.getType().equals(Material.AIR)) {
|
||||||
if (type == Material.FIRE) { // lit a lightable block
|
if (type == Material.FIRE) { // lit a lightable block
|
||||||
type = newBlock.getType();
|
type = newBlock.getType();
|
||||||
if (BlockGroup.LIGHTABLES.contains(type)) {
|
if (BlockGroup.LIGHTABLES.contains(type)) {
|
||||||
|
|
@ -111,7 +111,12 @@ public final class BlockDispenseListener extends Queue implements Listener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
queueBlockPlace(user, newBlock.getState(), newBlock.getType(), blockState, type, 1, 1, null);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue