Package dev.deepcore.challenge.session
Class PrepGuiCoordinatorService
java.lang.Object
dev.deepcore.challenge.session.PrepGuiCoordinatorService
Coordinates prep-book and prep-GUI interactions plus GUI page state.
-
Constructor Summary
ConstructorsConstructorDescriptionPrepGuiCoordinatorService(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. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandlePrepBookUse(org.bukkit.event.player.PlayerInteractEvent event) Handles prep-book interactions and opens prep GUI during prep phase.voidhandlePrepGuiClick(org.bukkit.event.inventory.InventoryClickEvent event) Handles prep GUI click actions including toggles and page navigation.voidhandlePrepGuiClose(org.bukkit.event.inventory.InventoryCloseEvent event) Restores prep-book state after prep GUI closes during prep phase.voidhandlePrepGuiDrag(org.bukkit.event.inventory.InventoryDragEvent event) Cancels drag interactions in prep GUI inventories.voidhandleProtectedPrepBookClick(org.bukkit.event.inventory.InventoryClickEvent event) Prevents moving prep books via click interactions.voidhandleProtectedPrepBookDrag(org.bukkit.event.inventory.InventoryDragEvent event) Prevents moving prep books via drag interactions.voidhandleProtectedPrepBookDrop(org.bukkit.event.player.PlayerDropItemEvent event) Prevents dropping prep books from inventory.voidhandleProtectedPrepBookSwapHands(org.bukkit.event.player.PlayerSwapHandItemsEvent event) Prevents swapping prep books between hands.voidonPlayerLeft(UUID playerId) Clears tracked GUI state for a player that left the server.voidRe-renders prep GUI for all players currently viewing it.
-
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 ownerlog- challenge logger for player/admin messagingsessionState- mutable session phase/state containerreadyPlayers- players marked ready during prepparticipants- active run participantsparticipantsView- participant roster and counts viewchallengeManager- challenge settings and component managerprepGuiRenderer- prep GUI rendering serviceprepBookService- prep guide book serviceprepGuiFlowService- prep GUI click-flow handler serviceprepReadinessService- readiness/countdown coordinator servicepreviewOrchestratorService- lobby preview orchestration serviceworldResetManagerSupplier- supplier for current world reset managerrecordsServiceSupplier- supplier for run records servicerunUiFormattingService- run time/label formatting serviceisDiscoPreviewBlockingChallengeStart- supplier for disco-start blocking stateannounceDiscoPreviewStartBlocked- runnable announcing disco start blockstartRun- runnable that starts a challenge runprepGuiTitle- prep GUI inventory title textrunHistoryDateFormatter- formatter for run history date labels
-
-
Method Details
-
onPlayerLeft
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.
-