From 612e96201cc3e46d741d0f1271d22a20460a2869 Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Mon, 18 Nov 2019 13:43:16 -0500 Subject: [PATCH] Fixed ItemTypeListFlag issue --- .../plotsquared/plot/flag/ItemTypeListFlag.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/ItemTypeListFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/ItemTypeListFlag.java index 2e9d80a38..5812588c2 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/ItemTypeListFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/ItemTypeListFlag.java @@ -1,14 +1,9 @@ package com.github.intellectualsites.plotsquared.plot.flag; import com.github.intellectualsites.plotsquared.plot.config.Captions; -import com.github.intellectualsites.plotsquared.plot.object.Plot; import com.github.intellectualsites.plotsquared.plot.util.StringMan; -import com.github.intellectualsites.plotsquared.plot.util.world.BlockUtil; import com.github.intellectualsites.plotsquared.plot.util.world.ItemUtil; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.item.ItemType; -import com.sk89q.worldedit.world.item.ItemTypes; import java.util.Arrays; import java.util.Objects; @@ -22,18 +17,15 @@ public class ItemTypeListFlag extends ListFlag> { } @Override public String valueToString(Object value) { - return StringMan.join((Set) value, ","); + return StringMan.join((Set) value, ","); } @Override public Set parseValue(final String value) { - return Arrays.stream(ItemUtil.parse(value)).filter(Objects::nonNull).collect(Collectors.toSet()); + return Arrays.stream(ItemUtil.parse(value)).filter(Objects::nonNull) + .collect(Collectors.toSet()); } @Override public String getValueDescription() { return Captions.FLAG_ERROR_PLOTBLOCKLIST.getTranslated(); } - - public boolean contains(Plot plot, BlockState value) { - return contains(plot, value.getBlockType().getItemType()); - } }