Class LobbySidebarService

java.lang.Object
dev.deepcore.challenge.ui.LobbySidebarService

public final class LobbySidebarService extends Object
Renders and clears the lobby sidebar scoreboard for players.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LobbySidebarService(String objectiveName, String sidebarTitle)
    Creates a lobby sidebar service.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    void
    clearLobbySidebar(org.bukkit.entity.Player player)
    Clears the managed sidebar objective from the player's scoreboard.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LobbySidebarService

      public LobbySidebarService(String objectiveName, String sidebarTitle)
      Creates a lobby sidebar service.
      Parameters:
      objectiveName - scoreboard objective name used for sidebar registration
      sidebarTitle - 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 updates
      bestOverall - best recorded overall completion time in milliseconds
      bestOverworldToNether - best recorded Overworld-to-Nether split in milliseconds
      bestNetherToBlaze - best recorded Nether-to-Blaze-Rods split in milliseconds
      bestBlazeToEnd - best recorded Blaze-Rods-to-End split in milliseconds
      bestNetherToEnd - best recorded Nether-to-End split in milliseconds
      bestEndToDragon - best recorded End-to-Dragon split in milliseconds
      onlineCount - number of online players
      phaseText - current session phase label
      readyCount - number of players currently marked ready
      durationFormatter - 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