From 93eef36c583de797cb0cc0d4aeb510439a8a764a Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 9 May 2020 21:55:45 +1200 Subject: [PATCH] Add chest to forbidden block disguises --- .../params/types/custom/ParamInfoItemBlock.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/params/types/custom/ParamInfoItemBlock.java b/src/main/java/me/libraryaddict/disguise/utilities/params/types/custom/ParamInfoItemBlock.java index 341e89a5..b0e29f44 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/params/types/custom/ParamInfoItemBlock.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/params/types/custom/ParamInfoItemBlock.java @@ -14,11 +14,19 @@ public class ParamInfoItemBlock extends ParamInfoItemStack { public ParamInfoItemBlock(Class paramClass, String name, String valueType, String description, Material[] possibleValues) { super(paramClass, name, valueType, description, Arrays.stream(possibleValues).filter(m -> { - if (!m.isBlock()) - return false; + switch (m) { + case CHEST: + case TRAPPED_CHEST: + return false; + default: + break; + } - if (NmsVersion.v1_13.isSupported()) + if (!m.isBlock()) { + return false; + } else if (NmsVersion.v1_13.isSupported()) { return true; + } switch (m) { case CAKE: