Package dev.deepcore.challenge.session
Class SessionOperationService
java.lang.Object
dev.deepcore.challenge.session.SessionOperationService
Provides a single operations facade over session-level service actions.
-
Constructor Summary
ConstructorsConstructorDescriptionSessionOperationService(Supplier<SessionUiCoordinatorService> sessionUiCoordinatorSupplier, Supplier<DegradingInventoryTickerService> degradingInventoryTickerSupplier, Supplier<DegradingInventoryService> degradingInventoryServiceSupplier, Supplier<SharedInventorySyncService> sharedInventorySyncServiceSupplier, Supplier<RunHealthCoordinatorService> runHealthCoordinatorServiceSupplier, Supplier<PrepGuiCoordinatorService> prepGuiCoordinatorServiceSupplier, Supplier<ActionBarTickerService> actionBarTickerServiceSupplier, Supplier<PausedRunStateService> pausedRunStateServiceSupplier, Supplier<WorldResetManager> worldResetManagerSupplier) Creates a session operation facade service. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyInitialHalfHeart(org.bukkit.entity.Player player) Applies the initial half-heart setting to a specific player.voidApplies initial half-heart challenge settings for online participants.voidClears action bars for all currently online players.voidclearLobbySidebar(org.bukkit.entity.Player player) Clears the lobby sidebar for the given player when supported.voidclearLockedBarrierSlots(org.bukkit.entity.Player player) Clears locked barrier slots for a player when degrading inventory is active.voidClears stored paused-run snapshots from the session state service.voidenforceInventorySlotCap(org.bukkit.entity.Player player) Enforces the active inventory slot cap for a player when enabled.voidRefreshes all currently open preparation GUIs if available.voidrestoreDefaultMaxHealth(org.bukkit.entity.Player player) Restores default max health values for the provided player.voidCaptures wearable snapshots for all active challenge participants.voidStarts the challenge action-bar task if the UI coordinator is available.voidstartDegradingInventoryTask(boolean resetSlots) Starts the degrading-inventory ticker and optionally resets slot state.voidStarts the lobby sidebar task if the UI coordinator is available.voidstashRunStateForLobby(org.bukkit.entity.Player player, boolean teleportToLobby) Stashes player run state for lobby transfer with optional teleport.voidSynchronizes shared health from the first online participant state.voidSynchronizes shared hunger from the most-satiated online participant.voidSynchronizes shared inventory from the first online participant snapshot.
-
Constructor Details
-
SessionOperationService
public SessionOperationService(Supplier<SessionUiCoordinatorService> sessionUiCoordinatorSupplier, Supplier<DegradingInventoryTickerService> degradingInventoryTickerSupplier, Supplier<DegradingInventoryService> degradingInventoryServiceSupplier, Supplier<SharedInventorySyncService> sharedInventorySyncServiceSupplier, Supplier<RunHealthCoordinatorService> runHealthCoordinatorServiceSupplier, Supplier<PrepGuiCoordinatorService> prepGuiCoordinatorServiceSupplier, Supplier<ActionBarTickerService> actionBarTickerServiceSupplier, Supplier<PausedRunStateService> pausedRunStateServiceSupplier, Supplier<WorldResetManager> worldResetManagerSupplier) Creates a session operation facade service.- Parameters:
sessionUiCoordinatorSupplier- supplier for session UI coordinator servicedegradingInventoryTickerSupplier- supplier for degrading inventory ticker servicedegradingInventoryServiceSupplier- supplier for degrading inventory servicesharedInventorySyncServiceSupplier- supplier for shared inventory sync servicerunHealthCoordinatorServiceSupplier- supplier for run health coordinator serviceprepGuiCoordinatorServiceSupplier- supplier for prep GUI coordinator serviceactionBarTickerServiceSupplier- supplier for action-bar ticker servicepausedRunStateServiceSupplier- supplier for paused-run state serviceworldResetManagerSupplier- supplier for world reset manager
-
-
Method Details
-
startActionBarTask
public void startActionBarTask()Starts the challenge action-bar task if the UI coordinator is available. -
startLobbySidebarTask
public void startLobbySidebarTask()Starts the lobby sidebar task if the UI coordinator is available. -
clearLobbySidebar
public void clearLobbySidebar(org.bukkit.entity.Player player) Clears the lobby sidebar for the given player when supported.- Parameters:
player- player whose lobby sidebar should be cleared
-
startDegradingInventoryTask
public void startDegradingInventoryTask(boolean resetSlots) Starts the degrading-inventory ticker and optionally resets slot state.- Parameters:
resetSlots- true to reset slot allowance before ticker start
-
enforceInventorySlotCap
public void enforceInventorySlotCap(org.bukkit.entity.Player player) Enforces the active inventory slot cap for a player when enabled.- Parameters:
player- player whose inventory slot cap should be enforced
-
clearLockedBarrierSlots
public void clearLockedBarrierSlots(org.bukkit.entity.Player player) Clears locked barrier slots for a player when degrading inventory is active.- Parameters:
player- player whose locked barriers should be cleared
-
snapshotEquippedWearablesForParticipants
public void snapshotEquippedWearablesForParticipants()Captures wearable snapshots for all active challenge participants. -
applyInitialHalfHeartIfEnabled
public void applyInitialHalfHeartIfEnabled()Applies initial half-heart challenge settings for online participants. -
applyInitialHalfHeart
public void applyInitialHalfHeart(org.bukkit.entity.Player player) Applies the initial half-heart setting to a specific player.- Parameters:
player- player who should receive initial half-heart settings
-
restoreDefaultMaxHealth
public void restoreDefaultMaxHealth(org.bukkit.entity.Player player) Restores default max health values for the provided player.- Parameters:
player- player whose max health should be restored
-
refreshOpenPrepGuis
public void refreshOpenPrepGuis()Refreshes all currently open preparation GUIs if available. -
clearActionBar
public void clearActionBar()Clears action bars for all currently online players. -
clearPausedSnapshots
public void clearPausedSnapshots()Clears stored paused-run snapshots from the session state service. -
stashRunStateForLobby
public void stashRunStateForLobby(org.bukkit.entity.Player player, boolean teleportToLobby) Stashes player run state for lobby transfer with optional teleport.- Parameters:
player- player whose run state should be stashedteleportToLobby- true to teleport player to lobby after stashing
-