From 322e186c4bfad2b499bc2db200d2a3f260af8fe7 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 12 Nov 2019 07:32:05 +0000 Subject: [PATCH] Ignore invalid blocks --- .../plotsquared/plot/flag/BlockStateListFlag.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BlockStateListFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BlockStateListFlag.java index b9f3367d0..117551488 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BlockStateListFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BlockStateListFlag.java @@ -8,6 +8,7 @@ import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockType; import java.util.Arrays; +import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; @@ -22,7 +23,7 @@ public class BlockStateListFlag extends ListFlag> { } @Override public Set parseValue(final String value) { - return Arrays.stream(BlockUtil.parse(value)).map(BlockState::getBlockType).collect(Collectors.toSet()); + return Arrays.stream(BlockUtil.parse(value)).filter(Objects::nonNull).map(BlockState::getBlockType).collect(Collectors.toSet()); } @Override public String getValueDescription() {