Package dev.deepcore.challenge.portal
Class RespawnRoutingService
java.lang.Object
dev.deepcore.challenge.portal.RespawnRoutingService
Resolves run-phase respawn destinations based on recorded death worlds.
-
Constructor Summary
ConstructorsConstructorDescriptionRespawnRoutingService(Supplier<WorldResetManager> worldResetManagerSupplier, Function<org.bukkit.World, org.bukkit.World> resolveLinkedPortalWorld, Function<org.bukkit.World, org.bukkit.World> resolveLinkedEndWorld) Creates a respawn routing service. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all pending per-player respawn world mappings.voidrecordDeathWorld(UUID playerId, org.bukkit.World deathWorld) Records the world where a player died for subsequent respawn routing.org.bukkit.LocationresolveRunRespawnLocation(UUID playerId) Resolves the target respawn location for a run participant.
-
Constructor Details
-
RespawnRoutingService
public RespawnRoutingService(Supplier<WorldResetManager> worldResetManagerSupplier, Function<org.bukkit.World, org.bukkit.World> resolveLinkedPortalWorld, Function<org.bukkit.World, org.bukkit.World> resolveLinkedEndWorld) Creates a respawn routing service.- Parameters:
worldResetManagerSupplier- supplier for active world reset managerresolveLinkedPortalWorld- resolver for Nether-to-overworld linked world routingresolveLinkedEndWorld- resolver for End-to-overworld linked world routing
-
-
Method Details
-
clearPendingRespawns
public void clearPendingRespawns()Clears all pending per-player respawn world mappings. -
recordDeathWorld
Records the world where a player died for subsequent respawn routing.- Parameters:
playerId- UUID of the player who dieddeathWorld- world where the death occurred
-
resolveRunRespawnLocation
Resolves the target respawn location for a run participant.- Parameters:
playerId- UUID of the player requiring respawn routing- Returns:
- resolved respawn location, or null when no target world is available
-