Class RunPauseResumeService

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

public final class RunPauseResumeService extends Object
Coordinates pause/resume lifecycle transitions for an active run.
  • Constructor Details

    • RunPauseResumeService

      public RunPauseResumeService(SessionState sessionState, Supplier<WorldResetManager> worldResetManagerSupplier, DeepCoreLogger log, Supplier<List<org.bukkit.entity.Player>> onlineParticipantsSupplier, Runnable clearPausedSnapshots, Consumer<org.bukkit.entity.Player> stashRunStateForLobby, PausedRunStateService pausedRunStateService, ActionBarTickerService actionBarTickerService, TaskGroup taskGroup, String degradingTaskKey, Runnable clearActionBar, PrepAreaService prepAreaService, ChallengeManager challengeManager, Runnable startActionBarTask, Runnable resumeDegradingInventoryTask)
      Creates a run pause/resume service.
      Parameters:
      sessionState - session phase and timing state
      worldResetManagerSupplier - supplier for world reset manager
      log - logger used for pause/resume feedback
      onlineParticipantsSupplier - supplier for online run participants
      clearPausedSnapshots - action to clear paused-run snapshots
      stashRunStateForLobby - action that snapshots a player's run state for lobby transfer
      pausedRunStateService - paused-run snapshot state service
      actionBarTickerService - action-bar ticker service
      taskGroup - task group managing scheduled run tasks
      degradingTaskKey - task key for degrading inventory ticker
      clearActionBar - action to clear all action bars
      prepAreaService - prep border service
      challengeManager - challenge manager for component checks
      startActionBarTask - action that starts action-bar ticking
      resumeDegradingInventoryTask - action that restarts degrading inventory ticker
  • Method Details

    • pause

      public boolean pause(org.bukkit.command.CommandSender sender, boolean announceBroadcast)
      Pauses the active run and snapshots participant state when allowed.
      Parameters:
      sender - command sender requesting pause
      announceBroadcast - true to log and broadcast pause initiation
      Returns:
      true when pause transition was applied
    • resume

      public boolean resume(org.bukkit.command.CommandSender sender)
      Resumes a paused run and restores participant state and tasks.
      Parameters:
      sender - command sender requesting resume
      Returns:
      true when resume transition was applied