From db65e967006011bd9256a73e9c3096b05c6b0e1c Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 14 Aug 2018 20:57:32 +1000 Subject: [PATCH] Ignore invalid properties --- .../com/sk89q/worldedit/world/block/BlockState.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java index ca7cdc824..f60796f26 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java @@ -19,6 +19,7 @@ package com.sk89q.worldedit.world.block; +import com.boydti.fawe.Fawe; import com.boydti.fawe.object.string.MutableCharSequence; import com.google.common.base.Function; import com.google.common.collect.Maps; @@ -132,9 +133,13 @@ public class BlockState implements BlockStateHolder { switch (c) { case ']': case ',': { - charSequence.setSubstring(last, i); - int index = property.getIndexFor(charSequence); - stateId = property.modifyIndex(stateId, index); + if (property != null) { + charSequence.setSubstring(last, i); + int index = property.getIndexFor(charSequence); + stateId = property.modifyIndex(stateId, index); + } else { + Fawe.debug("Invalid property " + type + " | " + charSequence); + } last = i + 1; break; }