From 8a448503e4b67d91bc6c22706ba4b2d09a608fc9 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Wed, 3 Dec 2025 23:42:50 +0800 Subject: [PATCH 1/2] Remove unused `use-improved-respawn-location-detection` config option --- .../multiverse/inventories/config/InventoriesConfig.java | 6 ++++-- .../inventories/config/InventoriesConfigNodes.java | 8 -------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/mvplugins/multiverse/inventories/config/InventoriesConfig.java b/src/main/java/org/mvplugins/multiverse/inventories/config/InventoriesConfig.java index 14d549ae..cbade8f1 100644 --- a/src/main/java/org/mvplugins/multiverse/inventories/config/InventoriesConfig.java +++ b/src/main/java/org/mvplugins/multiverse/inventories/config/InventoriesConfig.java @@ -144,12 +144,14 @@ public Try setActiveOptionalShares(Shares shares) { return this.configHandle.set(configNodes.activeOptionalShares, shares); } + @Deprecated(since = "5.3", forRemoval = true) public boolean getUseImprovedRespawnLocationDetection() { - return this.configHandle.get(configNodes.useImprovedRespawnLocationDetection); + return true; } + @Deprecated(since = "5.3", forRemoval = true) public Try setUseImprovedRespawnLocationDetection(boolean useImprovedRespawnLocationDetection) { - return this.configHandle.set(configNodes.useImprovedRespawnLocationDetection, useImprovedRespawnLocationDetection); + return Try.failure(new IllegalStateException("this config option has been removed")); } @ApiStatus.AvailableSince("5.2") diff --git a/src/main/java/org/mvplugins/multiverse/inventories/config/InventoriesConfigNodes.java b/src/main/java/org/mvplugins/multiverse/inventories/config/InventoriesConfigNodes.java index 62a50f41..368fd4fd 100644 --- a/src/main/java/org/mvplugins/multiverse/inventories/config/InventoriesConfigNodes.java +++ b/src/main/java/org/mvplugins/multiverse/inventories/config/InventoriesConfigNodes.java @@ -113,15 +113,7 @@ public Object serialize(Shares sharables, Class aClass) { .comment("") .build()); - final ConfigNode useImprovedRespawnLocationDetection = node(ConfigNode.builder("sharables.use-improved-respawn-location-detection", Boolean.class) - .comment("When enabled, we will use 1.21's PlayerSpawnChangeEvent to better detect bed and anchor respawn locations.") - .comment("This options is not applicable for older minecraft server versions.") - .defaultValue(true) - .name("use-improved-respawn-location-detection") - .build()); - final ConfigNode validateBedAnchorRespawnLocation = node(ConfigNode.builder("sharables.validate-bed-anchor-respawn-location", Boolean.class) - .comment("") .comment("When enabled, we will validate the bed/anchor respawn location on group/world change.") .comment("The validation checks if the bed/anchor block still exists at the saved location and is usable.") .comment("When the validation fails, the respawn location will be cleared and default world spawn will be used instead.") From eba89bf3aeb7d838a534e24b5ab1ff4ef08ee8a8 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Wed, 3 Dec 2025 23:48:45 +0800 Subject: [PATCH 2/2] Fix config test --- src/test/resources/config/fresh_config.yml | 1 - src/test/resources/config/migrated_config.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/src/test/resources/config/fresh_config.yml b/src/test/resources/config/fresh_config.yml index f4f4fc5c..8a0177b4 100644 --- a/src/test/resources/config/fresh_config.yml +++ b/src/test/resources/config/fresh_config.yml @@ -6,7 +6,6 @@ share-handling: active-optional-shares: [] sharables: - use-improved-respawn-location-detection: true validate-bed-anchor-respawn-location: true reset-last-location-on-death: false apply-last-location-for-all-teleports: true diff --git a/src/test/resources/config/migrated_config.yml b/src/test/resources/config/migrated_config.yml index ed14049b..819d805f 100644 --- a/src/test/resources/config/migrated_config.yml +++ b/src/test/resources/config/migrated_config.yml @@ -7,7 +7,6 @@ share-handling: - last_location sharables: - use-improved-respawn-location-detection: true validate-bed-anchor-respawn-location: true reset-last-location-on-death: false apply-last-location-for-all-teleports: true