mirror of
https://github.com/kaboomserver/extras.git
synced 2025-08-05 12:03:08 +00:00
Use isAir() on Material and improve readability
This also fixes spidey not working when inside VOID_AIR, which is presumably unintended behavior.
This commit is contained in:
parent
b2d5b9a6cb
commit
865de7f5bb
1 changed files with 4 additions and 4 deletions
|
@ -38,10 +38,10 @@ public final class CommandSpidey implements CommandExecutor {
|
||||||
distance
|
distance
|
||||||
);
|
);
|
||||||
|
|
||||||
Block block;
|
while (blockIterator.hasNext()) {
|
||||||
while (blockIterator.hasNext()
|
final Block block = blockIterator.next();
|
||||||
&& (Material.AIR.equals((block = blockIterator.next()).getType())
|
|
||||||
|| Material.CAVE_AIR.equals(block.getType()))) {
|
if (!block.getType().isAir()) break;
|
||||||
block.setType(Material.COBWEB);
|
block.setType(Material.COBWEB);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue