From 620308b2bab3ff982b55051e6e73a6948ff3add0 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Tue, 2 Oct 2018 05:51:08 -0400 Subject: [PATCH 1/2] Bypass warning invalid block registered for __RESERVED__ --- .../main/java/com/sk89q/worldedit/world/block/BlockTypes.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java index b86105d2f..2d14f2695 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java @@ -1015,7 +1015,7 @@ public enum BlockTypes implements BlockType { for (BlockTypes type : oldValues) { if (!blockMap.containsKey(type.getId())) { type.init(type.getId(), 0, new ArrayList<>()); - Fawe.debug("Invalid block registered " + type.getId()); + if (type != __RESERVED__) Fawe.debug("Invalid block registered " + type.getId()); size++; } if (type != __RESERVED__) { From 6a3177f4e7400a05084d569ab99584b1ec9a9384 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Tue, 2 Oct 2018 07:32:24 -0400 Subject: [PATCH 2/2] Fixed DefaultBlockParser incorrectly referencing disallowedBlocks --- .../sk89q/worldedit/extension/factory/DefaultBlockParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 86d5ef06b..39ff01699 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 @@ -259,7 +259,7 @@ public class DefaultBlockParser extends InputParser { if (context.isRestricted()) { Actor actor = context.requireActor(); if (actor != null) { - if (!actor.hasPermission("worldedit.anyblock") && worldEdit.getConfiguration().disallowedBlocks.contains(blockType.getId())) { + if (!actor.hasPermission("worldedit.anyblock") && worldEdit.getConfiguration().disallowedBlocks.contains(blockType)) { throw new DisallowedUsageException("You are not allowed to use '" + input + "'"); } if (nbt != null) {