Added out of world check to blocks

This commit is contained in:
Auxilor
2021-07-26 18:20:13 +01:00
parent 70a4a06d4f
commit cf01abcf87

View File

@@ -112,6 +112,10 @@ public class BlockUtils {
Validate.isTrue(initialized, "Must be initialized!");
Validate.notNull(blockBreakConsumer, "Must be initialized!");
if (block.getLocation().getY() < 0 || block.getLocation().getY() > 256) {
return;
}
blockBreakConsumer.accept(player, block);
}