From ed809b5b184e4ead3b1b61e9aab19f9e1e7cb841 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Sat, 21 Sep 2013 10:23:04 +0200 Subject: [PATCH] Fix: NPE when moving non-saved-survival-state --- .../minecraft/limitedcreative/blockstate/DBModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/DBModel.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/DBModel.java index 758c60f..931f87e 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/DBModel.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/DBModel.java @@ -27,7 +27,7 @@ public class DBModel { q.delete(to.getLocation()); q.move(from.getLocation(), to.getLocation()); HasBlockState metaBlock = getMetaBlock(from); - if (metaBlock.set) { + if (metaBlock.set && metaBlock.state != null) { BlockState state = metaBlock.state; state.setLocation(to.getLocation()); setMetaBlock(to, getMetaBlock(from).state);