Quick return for location loop

Signed-off-by: Etzelia <etzelia@hotmail.com>
grief
Etzelia 2020-07-30 21:21:01 -05:00
parent d070f47d2d
commit 35eae83dcc
No known key found for this signature in database
GPG Key ID: 708511AE7ABC5314
1 changed files with 1 additions and 0 deletions

View File

@ -50,6 +50,7 @@ public class BlockBreakListener implements Listener {
for (int z = -radius; z < radius; z++) {
if (x == 0 && y == 0 && z == 0) continue;
Block block = event.getBlock().getRelative(x, y, z);
if (cache.contains(block.getLocation())) return;
queue.add(new BlockEvent(event.getPlayer(), block.getType(), block.getLocation(), false));
}
}