Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,14 @@ public Try<Void> 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<Void> 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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,7 @@ public Object serialize(Shares sharables, Class<Shares> aClass) {
.comment("")
.build());

final ConfigNode<Boolean> 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<Boolean> 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.")
Expand Down
1 change: 0 additions & 1 deletion src/test/resources/config/fresh_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/test/resources/config/migrated_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down