From 84b0e9067fc4008bf0dc8a53fc69968f2345080c Mon Sep 17 00:00:00 2001 From: Christopher Bohn Date: Sun, 1 Sep 2024 19:36:56 -0700 Subject: [PATCH] Update matchers with 1.21 blocks --- .../griefcraft/util/matchers/DoorMatcher.java | 18 +++++++++++ src/main/resources/config/core.yml | 32 +++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/src/main/java/com/griefcraft/util/matchers/DoorMatcher.java b/src/main/java/com/griefcraft/util/matchers/DoorMatcher.java index c62bf16..9eb173e 100644 --- a/src/main/java/com/griefcraft/util/matchers/DoorMatcher.java +++ b/src/main/java/com/griefcraft/util/matchers/DoorMatcher.java @@ -113,6 +113,24 @@ public class DoorMatcher implements ProtectionFinder.Matcher { WOODEN_TRAP_DOORS.addAll(EnumSet.of(Material.BAMBOO_TRAPDOOR, Material.CHERRY_TRAPDOOR)); PRESSURE_PLATES.addAll(EnumSet.of(Material.BAMBOO_PRESSURE_PLATE, Material.CHERRY_PRESSURE_PLATE)); } + if (VersionUtil.getMinorVersion() > 20) { + PROTECTABLES_DOORS.addAll(EnumSet.of(Material.COPPER_DOOR, Material.EXPOSED_COPPER_DOOR, + Material.OXIDIZED_COPPER_DOOR, Material.WAXED_COPPER_DOOR, Material.WEATHERED_COPPER_DOOR, + Material.WAXED_EXPOSED_COPPER_DOOR, Material.WAXED_OXIDIZED_COPPER_DOOR, + Material.WAXED_WEATHERED_COPPER_DOOR)); + WOODEN_DOORS.addAll(EnumSet.of(Material.COPPER_DOOR, Material.EXPOSED_COPPER_DOOR, + Material.OXIDIZED_COPPER_DOOR, Material.WAXED_COPPER_DOOR, Material.WEATHERED_COPPER_DOOR, + Material.WAXED_EXPOSED_COPPER_DOOR, Material.WAXED_OXIDIZED_COPPER_DOOR, + Material.WAXED_WEATHERED_COPPER_DOOR)); + TRAP_DOORS.addAll(EnumSet.of(Material.COPPER_TRAPDOOR, Material.EXPOSED_COPPER_TRAPDOOR, + Material.OXIDIZED_COPPER_TRAPDOOR, Material.WAXED_COPPER_TRAPDOOR, + Material.WEATHERED_COPPER_TRAPDOOR, Material.WAXED_EXPOSED_COPPER_TRAPDOOR, + Material.WAXED_OXIDIZED_COPPER_TRAPDOOR, Material.WAXED_WEATHERED_COPPER_TRAPDOOR)); + WOODEN_TRAP_DOORS.addAll(EnumSet.of(Material.COPPER_TRAPDOOR, Material.EXPOSED_COPPER_TRAPDOOR, + Material.OXIDIZED_COPPER_TRAPDOOR, Material.WAXED_COPPER_TRAPDOOR, + Material.WEATHERED_COPPER_TRAPDOOR, Material.WAXED_EXPOSED_COPPER_TRAPDOOR, + Material.WAXED_OXIDIZED_COPPER_TRAPDOOR, Material.WAXED_WEATHERED_COPPER_TRAPDOOR)); + } } public boolean matches(ProtectionFinder finder) { diff --git a/src/main/resources/config/core.yml b/src/main/resources/config/core.yml index 92a9f93..339346a 100644 --- a/src/main/resources/config/core.yml +++ b/src/main/resources/config/core.yml @@ -310,6 +310,22 @@ protections: enabled: true cherry_door: enabled: true + copper_door: + enabled: true + exposed_copper_door: + enabled: true + oxidized_copper_door: + enabled: true + weathered_copper_door: + enabled: true + waxed_copper_door: + enabled: true + waxed_exposed_copper_door: + enabled: true + waxed_oxidized_copper_door: + enabled: true + waxed_weathered_copper_door: + enabled: true iron_trapdoor: enabled: true oak_trapdoor: @@ -334,6 +350,22 @@ protections: enabled: true cherry_trapdoor: enabled: true + copper_trapdoor: + enabled: true + exposed_copper_trapdoor: + enabled: true + oxidized_copper_trapdoor: + enabled: true + weathered_copper_trapdoor: + enabled: true + waxed_copper_trapdoor: + enabled: true + waxed_exposed_copper_trapdoor: + enabled: true + waxed_oxidized_copper_trapdoor: + enabled: true + waxed_weathered_copper_trapdoor: + enabled: true oak_fence_gate: enabled: true spruce_fence_gate: