mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
What are the dud BlockCategories?
This commit is contained in:
@ -63,7 +63,7 @@ public class BukkitPlayerBlockBag extends BlockBag implements SlottableBlockBag
|
||||
|
||||
@Override
|
||||
public void fetchBlock(BlockState blockState) throws BlockBagException {
|
||||
if (blockState.getBlockType() == BlockTypes.AIR) {
|
||||
if (blockState.getBlockType().getMaterial().isAir()) {
|
||||
throw new IllegalArgumentException("Can't fetch air block");
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ public class BukkitPlayerBlockBag extends BlockBag implements SlottableBlockBag
|
||||
|
||||
@Override
|
||||
public void storeBlock(BlockState blockState, int amount) throws BlockBagException {
|
||||
if (blockState.getBlockType() == BlockTypes.AIR) {
|
||||
if (blockState.getBlockType().getMaterial().isAir()) {
|
||||
throw new IllegalArgumentException("Can't store air block");
|
||||
}
|
||||
if (!blockState.getBlockType().hasItemType()) {
|
||||
|
@ -59,7 +59,7 @@ public class EditSessionBlockChangeDelegate implements BlockChangeDelegate {
|
||||
|
||||
@Override
|
||||
public boolean isEmpty(int x, int y, int z) {
|
||||
return editSession.getBlock(new Vector(x, y, z)).getBlockType() == BlockTypes.AIR;
|
||||
return editSession.getBlock(new Vector(x, y, z)).getBlockType().getMaterial().isAir();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user