Class ChatPanels

java.lang.Object
dev.despical.pixelpainter.command.ChatPanels

public final class ChatPanels extends Object
Renders help, source lists, material estimates and undo history as chat panels.

Panels share the ChatLayout separator, centered headings, bullet rows and page controls. Suggestions let players review a command before it changes terrain; run-command controls only navigate pages. Hover descriptions are wrapped for readability and dynamic values are rendered through Messages.

Call on the server thread. Rendering reads current messages and permissions but performs no file I/O, terrain mutation or journal ownership changes.

  • Constructor Summary

    Constructors
    Constructor
    Description
    ChatPanels(Supplier<Messages> messages, String version)
    Creates renderers that read the currently active message set on every call.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    help(org.bukkit.command.CommandSender sender, List<CommandAction> actions)
    Renders permission-filtered commands, grouped, with suggestions and hover explanations.
    void
    history(org.bukkit.command.CommandSender sender, List<PaintRecord> records, int page)
    Renders previously authorized records with undo-command suggestions.
    void
    images(org.bukkit.command.CommandSender sender, List<String> names, int page)
    Renders source files as creation-command suggestions.
    void
    materials(org.bukkit.command.CommandSender sender, String palette, List<String> names, int page)
    Renders a palette's material names with navigation.
    void
    plan(org.bukkit.command.CommandSender sender, String image, PaintPlan plan)
    Shows dimensions, transparency counts and the eight most-used materials.

    Methods inherited from class Object

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

    • ChatPanels

      public ChatPanels(Supplier<Messages> messages, String version)
      Creates renderers that read the currently active message set on every call.
      Parameters:
      messages - supplier of the active messages, so reloads apply immediately
      version - plugin version shown in the help subtitle
  • Method Details

    • help

      public void help(org.bukkit.command.CommandSender sender, List<CommandAction> actions)
      Renders permission-filtered commands, grouped, with suggestions and hover explanations.
      Parameters:
      sender - command audience
      actions - catalog of available commands
    • images

      public void images(org.bukkit.command.CommandSender sender, List<String> names, int page)
      Renders source files as creation-command suggestions.
      Parameters:
      sender - command audience
      names - source filenames
      page - one-based page
    • history

      public void history(org.bukkit.command.CommandSender sender, List<PaintRecord> records, int page)
      Renders previously authorized records with undo-command suggestions.
      Parameters:
      sender - command audience
      records - accessible records supplied by the service
      page - one-based page
    • materials

      public void materials(org.bukkit.command.CommandSender sender, String palette, List<String> names, int page)
      Renders a palette's material names with navigation.
      Parameters:
      sender - command audience
      palette - selected family used by navigation commands
      names - supported material names
      page - one-based page
    • plan

      public void plan(org.bukkit.command.CommandSender sender, String image, PaintPlan plan)
      Shows dimensions, transparency counts and the eight most-used materials.
      Parameters:
      sender - command audience
      image - source name
      plan - prepared estimate; no world preview is created