Minor formatting and neatness changes.

Dieser Commit ist enthalten in:
Matthew Miller 2018-08-23 20:15:31 +10:00
Ursprung 69ab1781c6
Commit 58a5d9961b
3 geänderte Dateien mit 10 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -62,7 +62,14 @@ public class BukkitBlockRegistry extends BundledBlockRegistry {
@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

Datei anzeigen

@ -22,9 +22,9 @@ package com.sk89q.worldedit.bukkit;
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 @@ import org.bukkit.entity.minecart.ExplosiveMinecart;
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 @@ class BukkitEntityProperties implements EntityProperties {
@Override
public boolean isArmorStand() {
return entity.getType() == armorStandType;
return entity instanceof ArmorStand;
}
@Override

Datei anzeigen

@ -26,7 +26,6 @@ import com.sk89q.worldedit.extent.inventory.OutOfBlocksException;
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;