Skip to content

Commit 1f8e4b4

Browse files
authored
Merge pull request #642 from Multiverse/refactor/remove-config-option
Remove unused `use-improved-respawn-location-detection` config option
2 parents 38ee711 + eba89bf commit 1f8e4b4

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

src/main/java/org/mvplugins/multiverse/inventories/config/InventoriesConfig.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,14 @@ public Try<Void> setActiveOptionalShares(Shares shares) {
144144
return this.configHandle.set(configNodes.activeOptionalShares, shares);
145145
}
146146

147+
@Deprecated(since = "5.3", forRemoval = true)
147148
public boolean getUseImprovedRespawnLocationDetection() {
148-
return this.configHandle.get(configNodes.useImprovedRespawnLocationDetection);
149+
return true;
149150
}
150151

152+
@Deprecated(since = "5.3", forRemoval = true)
151153
public Try<Void> setUseImprovedRespawnLocationDetection(boolean useImprovedRespawnLocationDetection) {
152-
return this.configHandle.set(configNodes.useImprovedRespawnLocationDetection, useImprovedRespawnLocationDetection);
154+
return Try.failure(new IllegalStateException("this config option has been removed"));
153155
}
154156

155157
@ApiStatus.AvailableSince("5.2")

src/main/java/org/mvplugins/multiverse/inventories/config/InventoriesConfigNodes.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,7 @@ public Object serialize(Shares sharables, Class<Shares> aClass) {
113113
.comment("")
114114
.build());
115115

116-
final ConfigNode<Boolean> useImprovedRespawnLocationDetection = node(ConfigNode.builder("sharables.use-improved-respawn-location-detection", Boolean.class)
117-
.comment("When enabled, we will use 1.21's PlayerSpawnChangeEvent to better detect bed and anchor respawn locations.")
118-
.comment("This options is not applicable for older minecraft server versions.")
119-
.defaultValue(true)
120-
.name("use-improved-respawn-location-detection")
121-
.build());
122-
123116
final ConfigNode<Boolean> validateBedAnchorRespawnLocation = node(ConfigNode.builder("sharables.validate-bed-anchor-respawn-location", Boolean.class)
124-
.comment("")
125117
.comment("When enabled, we will validate the bed/anchor respawn location on group/world change.")
126118
.comment("The validation checks if the bed/anchor block still exists at the saved location and is usable.")
127119
.comment("When the validation fails, the respawn location will be cleared and default world spawn will be used instead.")

src/test/resources/config/fresh_config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ share-handling:
66
active-optional-shares: []
77

88
sharables:
9-
use-improved-respawn-location-detection: true
109
validate-bed-anchor-respawn-location: true
1110
reset-last-location-on-death: false
1211
apply-last-location-for-all-teleports: true

src/test/resources/config/migrated_config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ share-handling:
77
- last_location
88

99
sharables:
10-
use-improved-respawn-location-detection: true
1110
validate-bed-anchor-respawn-location: true
1211
reset-last-location-on-death: false
1312
apply-last-location-for-all-teleports: true

0 commit comments

Comments
 (0)