Added getBlockReplacedState to BlockPlaceEvent, in case one wants to see what type of block was there previously.

By: VictorD <victor.danell@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2011-01-24 23:22:28 +01:00
parent d85ad792fb
commit b50a636f98

View File

@ -184,7 +184,7 @@ public class CraftBlockState implements BlockState {
private void createData(final byte data) { private void createData(final byte data) {
Material mat = Material.getMaterial(type); Material mat = Material.getMaterial(type);
if (mat == null) { if (mat == null || mat.getData() == null) {
this.data = new MaterialData(type, data); this.data = new MaterialData(type, data);
} else { } else {
this.data = mat.getNewData(data); this.data = mat.getNewData(data);