diff --git a/pom.xml b/pom.xml index ae5e57f..f4e5adc 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ spigot-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + https://hub.spigotmc.org/nexus/content/repositories/public/ @@ -18,20 +18,20 @@ org.spigotmc spigot-api - 1.13-R0.1-SNAPSHOT + 1.21.4-R0.1-SNAPSHOT provided org.bukkit bukkit - 1.13-R0.1-SNAPSHOT - provided + 1.20.5-R0.1-20240423.155811-1 + pom net.md-5 bungeecord-chat - 1.12-SNAPSHOT + 1.21-R0.1-SNAPSHOT diff --git a/src/main/java/net/simplycrafted/StickyLocks/Database.java b/src/main/java/net/simplycrafted/StickyLocks/Database.java index 41eb0f1..d1962a6 100644 --- a/src/main/java/net/simplycrafted/StickyLocks/Database.java +++ b/src/main/java/net/simplycrafted/StickyLocks/Database.java @@ -140,14 +140,7 @@ private Location getUnambiguousLocation(Block target) { // Doors only. This function's useful only for multiple-block Blocks that can't be // partially destroyed, which excludes chests. Block blockBelow = target.getRelative(BlockFace.DOWN); - if (target.getType().equals(Material.getMaterial("OAK_DOOR")) && blockBelow.getType().equals(Material.getMaterial("OAK_DOOR")) - || (target.getType().name().equals("IRON_DOOR") && blockBelow.getType().name().equals("IRON_DOOR")) - || (target.getType().name().equals("SPRUCE_DOOR") && blockBelow.getType().name().equals("SPRUCE_DOOR")) - || (target.getType().name().equals("BIRCH_DOOR") && blockBelow.getType().name().equals("BIRCH_DOOR")) - || (target.getType().name().equals("JUNGLE_DOOR") && blockBelow.getType().name().equals("JUNGLE_DOOR")) - || (target.getType().name().equals("ACACIA_DOOR") && blockBelow.getType().name().equals("ACACIA_DOOR")) - || (target.getType().name().equals("DARK_OAK_DOOR") && blockBelow.getType().name().equals("DARK_OAK_DOOR")) - ) { + if (target.getType().name().contains("_DOOR") && blockBelow.getType().name().equals(target.getType().name())) { // Doors have an ambiguous location, but we only need to check // the block below to disambiguate. return blockBelow.getLocation(); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 911bc03..e3fb58e 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -75,6 +75,45 @@ protectables: - CRIMSON_FENCE_GATE - WARPED_DOOR - WARPED_FENCE_GATE + - MANGROVE_BUTTON + - MANGROVE_DOOR + - MANGROVE_FENCE_GATE + - MANGROVE_PRESSURE_PLATE + - MANGROVE_TRAPDOOR + - CHERRY_BUTTON + - CHERRY_DOOR + - CHERRY_FENCE_GATE + - CHERRY_PRESSURE_PLATE + - CHERRY_TRAPDOOR + - BAMBOO_BUTTON + - BAMBOO_DOOR + - BAMBOO_FENCE_GATE + - BAMBOO_PRESSURE_PLATE + - BAMBOO_TRAPDOOR + - CHISELED_BOOKSHELF + - COPPER_DOOR + - EXPOSED_COPPER_DOOR + - OXIDIZED_COPPER_DOOR + - WAXED_COPPER_DOOR + - WAXED_EXPOSED_COPPER_DOOR + - WAXED_OXIDIZED_COPPER_DOOR + - WAXED_WEATHERED_COPPER_DOOR + - WEATHERED_COPPER_DOOR + - COPPER_TRAPDOOR + - EXPOSED_COPPER_TRAPDOOR + - OXIDIZED_COPPER_TRAPDOOR + - WAXED_COPPER_TRAPDOOR + - WAXED_EXPOSED_COPPER_TRAPDOOR + - WAXED_OXIDIZED_COPPER_TRAPDOOR + - WAXED_WEATHERED_COPPER_TRAPDOOR + - WEATHERED_COPPER_TRAPDOOR + - CRAFTER + - DECORATED_POT + - PALE_OAK_BUTTON + - PALE_OAK_DOOR + - PALE_OAK_FENCE_GATE + - PALE_OAK_PRESSURE_PLATE + - PALE_OAK_TRAPDOOR tool: STICK chatprefix: SL -populateplayers: true +populateplayers: false \ No newline at end of file