From b50a636f98ad59887a787e9b3fb6fa2bd44d07ab Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 24 Jan 2011 23:22:28 +0100 Subject: [PATCH] Added getBlockReplacedState to BlockPlaceEvent, in case one wants to see what type of block was there previously. By: VictorD --- .../main/java/org/bukkit/craftbukkit/block/CraftBlockState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java index eb5df635a1..00d5f9fb25 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java @@ -184,7 +184,7 @@ public class CraftBlockState implements BlockState { private void createData(final byte data) { Material mat = Material.getMaterial(type); - if (mat == null) { + if (mat == null || mat.getData() == null) { this.data = new MaterialData(type, data); } else { this.data = mat.getNewData(data);