Class SessionTransitionOrchestratorService

java.lang.Object
dev.deepcore.challenge.session.SessionTransitionOrchestratorService

public final class SessionTransitionOrchestratorService extends Object
Coordinates top-level session transitions between prep and run phases.
  • Constructor Details

    • SessionTransitionOrchestratorService

      public SessionTransitionOrchestratorService(org.bukkit.plugin.java.JavaPlugin plugin, DeepCoreLogger log, SessionState sessionState, ChallengeManager challengeManager, Set<UUID> readyPlayers, Set<UUID> participants, Set<UUID> eliminatedPlayers, Set<UUID> recentlyDeadPlayers, DegradingInventoryService degradingInventoryService, SharedVitalsService sharedVitalsService, RunProgressService runProgressService, RunStatusService runStatusService, PrepCountdownService prepCountdownService, TaskGroup taskGroup, String degradingInventoryTaskKey, String lobbySidebarTaskKey, ActionBarTickerService actionBarTickerService, CompletionReturnService completionReturnService, PausedRunStateService pausedRunStateService, PrepAreaService prepAreaService, WorldClassificationService worldClassificationService, PreviewOrchestratorService previewOrchestratorService, PreviewAnchorService previewAnchorService, PrepBookService prepBookService, PortalRoutingService portalRoutingService, RespawnRoutingService respawnRoutingService, SharedInventorySyncService sharedInventorySyncService, WorldStorageService worldStorageService, RunHealthCoordinatorService runHealthCoordinatorService, Runnable syncWorldRules, Runnable refreshLobbyPreview, Runnable refreshOpenPrepGuis, Runnable startLobbySidebarTask, Runnable clearPausedSnapshots, Consumer<org.bukkit.entity.Player> clearLobbySidebar, Consumer<org.bukkit.entity.Player> stashRunStateForLobby, Supplier<WorldResetManager> worldResetManagerSupplier)
      Creates the session transition orchestrator service.
      Parameters:
      plugin - plugin scheduler and lifecycle owner
      log - challenge logger for player/admin messaging
      sessionState - mutable session phase/state container
      challengeManager - challenge configuration and toggles manager
      readyPlayers - players marked ready during prep
      participants - active run participants
      eliminatedPlayers - hardcore-eliminated participants
      recentlyDeadPlayers - recently dead participants for failure checks
      degradingInventoryService - degrading-inventory state service
      sharedVitalsService - shared health/hunger synchronization service
      runProgressService - run milestone progress tracker
      runStatusService - run status/timing announcer service
      prepCountdownService - prep countdown scheduler service
      taskGroup - grouped task lifecycle manager
      degradingInventoryTaskKey - task key for degrading-inventory ticker
      lobbySidebarTaskKey - task key for lobby sidebar ticker
      actionBarTickerService - action-bar ticker service
      completionReturnService - completion return/teleport service
      pausedRunStateService - paused-run snapshot state service
      prepAreaService - prep area border and region service
      worldClassificationService - world classification helper service
      previewOrchestratorService - lobby preview orchestration service
      previewAnchorService - lobby anchor/respawn resolver service
      prepBookService - prep guide book service
      portalRoutingService - portal transit routing service
      respawnRoutingService - respawn routing service
      sharedInventorySyncService - shared inventory synchronization service
      worldStorageService - world storage directory manager
      runHealthCoordinatorService - run health/vitals coordinator service
      syncWorldRules - runnable that reapplies world rule policies
      refreshLobbyPreview - runnable that refreshes lobby preview state
      refreshOpenPrepGuis - runnable that refreshes open prep GUIs
      startLobbySidebarTask - runnable that starts lobby sidebar updates
      clearPausedSnapshots - runnable that clears paused run snapshots
      clearLobbySidebar - consumer clearing a player's lobby sidebar
      stashRunStateForLobby - consumer stashing a player's run state for lobby
      worldResetManagerSupplier - supplier for current world reset manager
  • Method Details

    • initialize

      public void initialize()
      Initializes prep-mode runtime state and lobby preview infrastructure.
    • shutdown

      public void shutdown()
      Shuts down active tasks and clears transient session runtime state.
    • resetForNewRun

      public void resetForNewRun()
      Resets all run state and returns the session to prep mode defaults.
    • endChallengeAndReturnToPrep

      public void endChallengeAndReturnToPrep()
      Ends an active challenge and transitions all players back to prep mode.
    • ensurePrepBook

      public void ensurePrepBook(org.bukkit.entity.Player player)
      Ensures a player has the prep book while the session is in prep phase.
      Parameters:
      player - player who should receive prep book when in prep phase
    • handleWorldLoad

      public void handleWorldLoad(org.bukkit.event.world.WorldLoadEvent event)
      Handles world load events by preparing storage and refreshing previews.
      Parameters:
      event - world load event carrying the loaded world context
    • clearPausedSnapshots

      public void clearPausedSnapshots()
      Clears paused run snapshots held by the paused-run state service.