From 8de1fff2634d7b43718805d9180f546d5109cdfe Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 16 Aug 2018 00:34:20 +1000 Subject: [PATCH] Fix block parse NPE --- .../sk89q/worldedit/extension/factory/DefaultBlockParser.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/DefaultBlockParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/DefaultBlockParser.java index e42df8d1e..d028ec40b 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/DefaultBlockParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/DefaultBlockParser.java @@ -225,8 +225,7 @@ public class DefaultBlockParser extends InputParser { nbt = item.getNbtData(); } else { BlockTypes type = BlockTypes.parse(typeString.toLowerCase()); - state = type.getDefaultState(); - + if (type != null) state = type.getDefaultState(); if (state == null) { throw new NoMatchException("Does not match a valid block type: '" + input + "'"); }