Class PrepGuiCoordinatorService

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

public final class PrepGuiCoordinatorService extends Object
Coordinates prep-book and prep-GUI interactions plus GUI page state.
  • Constructor Details

    • PrepGuiCoordinatorService

      public PrepGuiCoordinatorService(org.bukkit.plugin.java.JavaPlugin plugin, DeepCoreLogger log, SessionState sessionState, Set<UUID> readyPlayers, Set<UUID> participants, ParticipantsView participantsView, ChallengeManager challengeManager, PrepGuiRenderer prepGuiRenderer, PrepBookService prepBookService, PrepGuiFlowService prepGuiFlowService, PrepReadinessService prepReadinessService, PreviewOrchestratorService previewOrchestratorService, Supplier<WorldResetManager> worldResetManagerSupplier, Supplier<RunRecordsService> recordsServiceSupplier, RunUiFormattingService runUiFormattingService, BooleanSupplier isDiscoPreviewBlockingChallengeStart, Runnable announceDiscoPreviewStartBlocked, Runnable startRun, String prepGuiTitle, DateTimeFormatter runHistoryDateFormatter)
      Creates a prep GUI coordination service.
      Parameters:
      plugin - plugin scheduler and lifecycle owner
      log - challenge logger for player/admin messaging
      sessionState - mutable session phase/state container
      readyPlayers - players marked ready during prep
      participants - active run participants
      participantsView - participant roster and counts view
      challengeManager - challenge settings and component manager
      prepGuiRenderer - prep GUI rendering service
      prepBookService - prep guide book service
      prepGuiFlowService - prep GUI click-flow handler service
      prepReadinessService - readiness/countdown coordinator service
      previewOrchestratorService - lobby preview orchestration service
      worldResetManagerSupplier - supplier for current world reset manager
      recordsServiceSupplier - supplier for run records service
      runUiFormattingService - run time/label formatting service
      isDiscoPreviewBlockingChallengeStart - supplier for disco-start blocking state
      announceDiscoPreviewStartBlocked - runnable announcing disco start block
      startRun - runnable that starts a challenge run
      prepGuiTitle - prep GUI inventory title text
      runHistoryDateFormatter - formatter for run history date labels
  • Method Details

    • onPlayerLeft

      public void onPlayerLeft(UUID playerId)
      Clears tracked GUI state for a player that left the server.
      Parameters:
      playerId - unique identifier of the player who left
    • handlePrepBookUse

      public void handlePrepBookUse(org.bukkit.event.player.PlayerInteractEvent event)
      Handles prep-book interactions and opens prep GUI during prep phase.
      Parameters:
      event - player interaction event to evaluate
    • handleProtectedPrepBookClick

      public void handleProtectedPrepBookClick(org.bukkit.event.inventory.InventoryClickEvent event)
      Prevents moving prep books via click interactions.
      Parameters:
      event - inventory click event to evaluate
    • handleProtectedPrepBookDrag

      public void handleProtectedPrepBookDrag(org.bukkit.event.inventory.InventoryDragEvent event)
      Prevents moving prep books via drag interactions.
      Parameters:
      event - inventory drag event to evaluate
    • handleProtectedPrepBookDrop

      public void handleProtectedPrepBookDrop(org.bukkit.event.player.PlayerDropItemEvent event)
      Prevents dropping prep books from inventory.
      Parameters:
      event - player drop item event to evaluate
    • handleProtectedPrepBookSwapHands

      public void handleProtectedPrepBookSwapHands(org.bukkit.event.player.PlayerSwapHandItemsEvent event)
      Prevents swapping prep books between hands.
      Parameters:
      event - player swap hand items event to evaluate
    • handlePrepGuiClick

      public void handlePrepGuiClick(org.bukkit.event.inventory.InventoryClickEvent event)
      Handles prep GUI click actions including toggles and page navigation.
      Parameters:
      event - inventory click event within a prep GUI
    • handlePrepGuiDrag

      public void handlePrepGuiDrag(org.bukkit.event.inventory.InventoryDragEvent event)
      Cancels drag interactions in prep GUI inventories.
      Parameters:
      event - inventory drag event for possible prep GUI interaction
    • handlePrepGuiClose

      public void handlePrepGuiClose(org.bukkit.event.inventory.InventoryCloseEvent event)
      Restores prep-book state after prep GUI closes during prep phase.
      Parameters:
      event - inventory close event for a prep GUI
    • refreshOpenPrepGuis

      public void refreshOpenPrepGuis()
      Re-renders prep GUI for all players currently viewing it.