Class PrepGuiRenderer

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

public final class PrepGuiRenderer extends Object
Renders prep GUI pages and run history entries for challenge setup flows.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    applyPrepGuiDecorations(org.bukkit.inventory.Inventory inventory)
    Applies decorative border panes to the prep GUI inventory frame.
    boolean
    hasRunHistoryNextPage(int page, int totalRecords)
    Returns whether a subsequent run-history page exists for the current index.
    void
    populateCategoriesPage(org.bukkit.inventory.Inventory inventory, boolean ready, int readyCount, int onlineCount, boolean previewEnabled)
    Populates the prep categories page with navigation and ready controls.
    void
    populateHealthPage(org.bukkit.inventory.Inventory inventory, ChallengeManager challengeManager, boolean ready, int readyCount, int onlineCount, boolean previewEnabled)
    Populates the health mechanics page and ready/world controls.
    void
    populateInventoryPage(org.bukkit.inventory.Inventory inventory, ChallengeManager challengeManager, boolean ready, int readyCount, int onlineCount, boolean previewEnabled)
    Populates the inventory mechanics page and ready/world controls.
    int
    populateRunHistoryPage(org.bukkit.inventory.Inventory inventory, int page, List<RunRecord> records, DateTimeFormatter dateFormatter, LongFunction<String> durationFormatter)
    Populates one run-history page and returns the normalized page index used.

    Methods inherited from class java.lang.Object

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

    • PrepGuiRenderer

      public PrepGuiRenderer()
  • Method Details

    • applyPrepGuiDecorations

      public void applyPrepGuiDecorations(org.bukkit.inventory.Inventory inventory)
      Applies decorative border panes to the prep GUI inventory frame.
      Parameters:
      inventory - prep GUI inventory to decorate
    • populateCategoriesPage

      public void populateCategoriesPage(org.bukkit.inventory.Inventory inventory, boolean ready, int readyCount, int onlineCount, boolean previewEnabled)
      Populates the prep categories page with navigation and ready controls.
      Parameters:
      inventory - prep GUI inventory to populate
      ready - whether the viewing player is marked ready
      readyCount - number of ready participants
      onlineCount - number of online participants
      previewEnabled - whether world preview mechanics are enabled
    • populateInventoryPage

      public void populateInventoryPage(org.bukkit.inventory.Inventory inventory, ChallengeManager challengeManager, boolean ready, int readyCount, int onlineCount, boolean previewEnabled)
      Populates the inventory mechanics page and ready/world controls.
      Parameters:
      inventory - prep GUI inventory to populate
      challengeManager - challenge manager that provides enabled component states
      ready - whether the viewing player is marked ready
      readyCount - number of ready participants
      onlineCount - number of online participants
      previewEnabled - whether world preview mechanics are enabled
    • populateHealthPage

      public void populateHealthPage(org.bukkit.inventory.Inventory inventory, ChallengeManager challengeManager, boolean ready, int readyCount, int onlineCount, boolean previewEnabled)
      Populates the health mechanics page and ready/world controls.
      Parameters:
      inventory - prep GUI inventory to populate
      challengeManager - challenge manager that provides enabled component states
      ready - whether the viewing player is marked ready
      readyCount - number of ready participants
      onlineCount - number of online participants
      previewEnabled - whether world preview mechanics are enabled
    • populateRunHistoryPage

      public int populateRunHistoryPage(org.bukkit.inventory.Inventory inventory, int page, List<RunRecord> records, DateTimeFormatter dateFormatter, LongFunction<String> durationFormatter)
      Populates one run-history page and returns the normalized page index used.
      Parameters:
      inventory - prep GUI inventory to populate
      page - requested zero-based run history page index
      records - run records ordered for display
      dateFormatter - formatter for record timestamps
      durationFormatter - formatter for split durations in milliseconds
      Returns:
      normalized page index that was actually rendered
    • hasRunHistoryNextPage

      public boolean hasRunHistoryNextPage(int page, int totalRecords)
      Returns whether a subsequent run-history page exists for the current index.
      Parameters:
      page - current zero-based page index
      totalRecords - total number of available run records
      Returns:
      true when a later page exists