diff options
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java index 13ac9bf2..f432abe1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java @@ -124,6 +124,8 @@ public class CraftBlockState implements BlockState { public void setType(final Material type) { Preconditions.checkArgument(type != null, "Material cannot be null"); + Preconditions.checkArgument(type.isBlock(), "Material must be a block!"); + if (this.getType() != type) { this.data = CraftMagicNumbers.getBlock(type).getBlockData(); } |