mirror of
https://github.com/kaboomserver/extras.git
synced 2025-04-22 09:23:40 -04: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
|
||||
);
|
||||
|
||||
Block block;
|
||||
while (blockIterator.hasNext()
|
||||
&& (Material.AIR.equals((block = blockIterator.next()).getType())
|
||||
|| Material.CAVE_AIR.equals(block.getType()))) {
|
||||
while (blockIterator.hasNext()) {
|
||||
final Block block = blockIterator.next();
|
||||
|
||||
if (!block.getType().isAir()) break;
|
||||
block.setType(Material.COBWEB);
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue