Package dev.deepcore.challenge.session
Class SessionPlayerLifecycleService
java.lang.Object
dev.deepcore.challenge.session.SessionPlayerLifecycleService
Coordinates player lifecycle events across prep/countdown/run phases.
-
Constructor Summary
ConstructorsConstructorDescriptionSessionPlayerLifecycleService(org.bukkit.plugin.java.JavaPlugin plugin, DeepCoreLogger log, ChallengeManager challengeManager, SessionState sessionState, Set<UUID> readyPlayers, Set<UUID> participants, Set<UUID> eliminatedPlayers, Set<UUID> recentlyDeadPlayers, PlayerLobbyStateService playerLobbyStateService, PreviewAnchorService previewAnchorService, PreviewOrchestratorService previewOrchestratorService, WorldClassificationService worldClassificationService, PrepAreaService prepAreaService, PrepBookService prepBookService, PrepGuiCoordinatorService prepGuiCoordinatorService, PrepReadinessService prepReadinessService, RunPauseResumeService runPauseResumeService, RespawnRoutingService respawnRoutingService, SessionFailureService sessionFailureService, RunStatusService runStatusService, SharedInventorySyncService sharedInventorySyncService, BooleanSupplier isSharedInventoryEnabled, Predicate<org.bukkit.entity.Player> isChallengeActive, Supplier<List<org.bukkit.entity.Player>> onlineParticipantsSupplier, Consumer<org.bukkit.entity.Player> enforceInventorySlotCap, Consumer<org.bukkit.entity.Player> clearLockedBarrierSlots, Consumer<org.bukkit.entity.Player> applyInitialHalfHeart, Consumer<org.bukkit.entity.Player> restoreDefaultMaxHealth, Runnable syncWorldRules, Runnable refreshLobbyPreview, Runnable refreshOpenPrepGuis, Runnable startRun, Runnable endChallengeAndReturnToPrep, Runnable syncSharedInventoryFromFirstParticipant, Runnable syncSharedHealthFromFirstParticipant, Runnable syncSharedHungerFromMostFilledParticipant, BooleanSupplier isDiscoPreviewBlockingChallengeStart, Runnable announceDiscoPreviewStartBlocked) Creates a session player lifecycle coordination service. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandlePlayerChangedWorld(org.bukkit.event.player.PlayerChangedWorldEvent event) Handles world transitions and updates lobby/run state for the player.voidhandlePlayerDeath(org.bukkit.event.entity.PlayerDeathEvent event) Handles participant death bookkeeping and failure-path transitions.voidhandlePlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) Handles player joins and applies session-phase specific onboarding state.voidhandlePlayerQuit(org.bukkit.event.player.PlayerQuitEvent event) Handles player quits and updates readiness/countdown or pause state as needed.voidhandlePlayerRespawn(org.bukkit.event.player.PlayerRespawnEvent event) Handles participant respawn routing and post-respawn challenge sync actions.
-
Constructor Details
-
Method Details
-
handlePlayerJoin
public void handlePlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) Handles player joins and applies session-phase specific onboarding state.- Parameters:
event- join event for the connected player
-
handlePlayerQuit
public void handlePlayerQuit(org.bukkit.event.player.PlayerQuitEvent event) Handles player quits and updates readiness/countdown or pause state as needed.- Parameters:
event- quit event for the disconnecting player
-
handlePlayerDeath
public void handlePlayerDeath(org.bukkit.event.entity.PlayerDeathEvent event) Handles participant death bookkeeping and failure-path transitions.- Parameters:
event- death event for a participant
-
handlePlayerRespawn
public void handlePlayerRespawn(org.bukkit.event.player.PlayerRespawnEvent event) Handles participant respawn routing and post-respawn challenge sync actions.- Parameters:
event- respawn event for a participant
-
handlePlayerChangedWorld
public void handlePlayerChangedWorld(org.bukkit.event.player.PlayerChangedWorldEvent event) Handles world transitions and updates lobby/run state for the player.- Parameters:
event- world-change event for a participant
-