Package dev.deepcore.challenge.session
Class PlayerLobbyStateService
java.lang.Object
dev.deepcore.challenge.session.PlayerLobbyStateService
Handles player game-mode enforcement and lobby loadout application.
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerLobbyStateService(WorldClassificationService worldClassificationService, PrepBookService prepBookService) Creates a player lobby state service. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyLobbyInventoryLoadoutIfInLobbyWorld(org.bukkit.entity.Player player) Applies lobby inventory loadout when the player is in a lobby/limbo world.voidenforceSurvivalOnWorldEntry(org.bukkit.entity.Player player, boolean runningPhase, boolean hardcoreEnabled, Set<UUID> eliminatedPlayers) Enforces survival mode on world entry for non-eliminated participants.
-
Constructor Details
-
PlayerLobbyStateService
public PlayerLobbyStateService(WorldClassificationService worldClassificationService, PrepBookService prepBookService) Creates a player lobby state service.- Parameters:
worldClassificationService- world classification helperprepBookService- prep book inventory helper
-
-
Method Details
-
enforceSurvivalOnWorldEntry
public void enforceSurvivalOnWorldEntry(org.bukkit.entity.Player player, boolean runningPhase, boolean hardcoreEnabled, Set<UUID> eliminatedPlayers) Enforces survival mode on world entry for non-eliminated participants.- Parameters:
player- player whose game mode should be normalizedrunningPhase- whether the challenge is currently runninghardcoreEnabled- whether hardcore mode is enabledeliminatedPlayers- UUIDs of eliminated players
-
applyLobbyInventoryLoadoutIfInLobbyWorld
public void applyLobbyInventoryLoadoutIfInLobbyWorld(org.bukkit.entity.Player player) Applies lobby inventory loadout when the player is in a lobby/limbo world.- Parameters:
player- player whose inventory should be reset for lobby state
-