Package dev.deepcore.challenge.ui
Class LobbySidebarService
java.lang.Object
dev.deepcore.challenge.ui.LobbySidebarService
Renders and clears the lobby sidebar scoreboard for players.
-
Constructor Summary
ConstructorsConstructorDescriptionLobbySidebarService(String objectiveName, String sidebarTitle) Creates a lobby sidebar service. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyLobbySidebar(org.bukkit.entity.Player player, long bestOverall, long bestOverworldToNether, long bestNetherToBlaze, long bestBlazeToEnd, long bestNetherToEnd, long bestEndToDragon, int onlineCount, String phaseText, int readyCount, LongFunction<String> durationFormatter) Applies lobby sidebar content with best-time, splits, and session status.voidclearLobbySidebar(org.bukkit.entity.Player player) Clears the managed sidebar objective from the player's scoreboard.
-
Constructor Details
-
LobbySidebarService
Creates a lobby sidebar service.- Parameters:
objectiveName- scoreboard objective name used for sidebar registrationsidebarTitle- title shown at the top of the sidebar
-
-
Method Details
-
applyLobbySidebar
public void applyLobbySidebar(org.bukkit.entity.Player player, long bestOverall, long bestOverworldToNether, long bestNetherToBlaze, long bestBlazeToEnd, long bestNetherToEnd, long bestEndToDragon, int onlineCount, String phaseText, int readyCount, LongFunction<String> durationFormatter) Applies lobby sidebar content with best-time, splits, and session status.- Parameters:
player- player receiving sidebar updatesbestOverall- best recorded overall completion time in millisecondsbestOverworldToNether- best recorded Overworld-to-Nether split in millisecondsbestNetherToBlaze- best recorded Nether-to-Blaze-Rods split in millisecondsbestBlazeToEnd- best recorded Blaze-Rods-to-End split in millisecondsbestNetherToEnd- best recorded Nether-to-End split in millisecondsbestEndToDragon- best recorded End-to-Dragon split in millisecondsonlineCount- number of online playersphaseText- current session phase labelreadyCount- number of players currently marked readydurationFormatter- formatter for record durations in milliseconds
-
clearLobbySidebar
public void clearLobbySidebar(org.bukkit.entity.Player player) Clears the managed sidebar objective from the player's scoreboard.- Parameters:
player- player whose sidebar should be cleared
-