Class RespawnRoutingService

java.lang.Object
dev.deepcore.challenge.portal.RespawnRoutingService

public final class RespawnRoutingService extends Object
Resolves run-phase respawn destinations based on recorded death worlds.
  • 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 manager
      resolveLinkedPortalWorld - resolver for Nether-to-overworld linked world routing
      resolveLinkedEndWorld - resolver for End-to-overworld linked world routing
  • Method Details

    • clearPendingRespawns

      public void clearPendingRespawns()
      Clears all pending per-player respawn world mappings.
    • recordDeathWorld

      public void recordDeathWorld(UUID playerId, org.bukkit.World deathWorld)
      Records the world where a player died for subsequent respawn routing.
      Parameters:
      playerId - UUID of the player who died
      deathWorld - world where the death occurred
    • resolveRunRespawnLocation

      public org.bukkit.Location resolveRunRespawnLocation(UUID playerId)
      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