Permalink
Browse files

Minor formatting and neatness changes.

  • Loading branch information...
me4502 committed Aug 23, 2018
1 parent 69ab178 commit 58a5d9961bc2d02d040fde6c1cebca82407a6766
@@ -62,7 +62,14 @@ public BukkitBlockMaterial(@Nullable BlockMaterial material, Material bukkitMate
@Override
public boolean isAir() {
return material == Material.AIR || material == Material.CAVE_AIR || material == Material.VOID_AIR;
switch (material) {
case AIR:
case CAVE_AIR:
case VOID_AIR:
return true;
default:
return false;
}
}
@Override
@@ -22,9 +22,9 @@
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.entity.metadata.EntityProperties;
import com.sk89q.worldedit.util.Enums;
import org.bukkit.entity.Ambient;
import org.bukkit.entity.Animals;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Boat;
import org.bukkit.entity.ComplexEntityPart;
import org.bukkit.entity.Entity;
@@ -46,9 +46,6 @@
class BukkitEntityProperties implements EntityProperties {
private static final org.bukkit.entity.EntityType armorStandType =
Enums.findByValue(org.bukkit.entity.EntityType.class, "ARMOR_STAND");
private final Entity entity;
BukkitEntityProperties(Entity entity) {
@@ -143,7 +140,7 @@ public boolean isTagged() {
@Override
public boolean isArmorStand() {
return entity.getType() == armorStandType;
return entity instanceof ArmorStand;
}
@Override
@@ -26,7 +26,6 @@
import com.sk89q.worldedit.extent.inventory.OutOfSpaceException;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

0 comments on commit 58a5d99

Please sign in to comment.