Class CosmeticsMenuCommand

java.lang.Object
com.storytimeproductions.stweaks.commands.CosmeticsMenuCommand
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.event.Listener

public class CosmeticsMenuCommand extends Object implements org.bukkit.command.CommandExecutor, org.bukkit.event.Listener
Command executor and menu handler for the Cosmetics GUI. Handles opening the cosmetics menu, pagination, and reloading cosmetics.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new CosmeticsMenuCommand.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args)
    Handles the /cosmetics command, opening the menu or reloading cosmetics.
    static void
    openCosmeticView(org.bukkit.entity.Player player, Cosmetic cosmetic, int returnPage)
    Opens a detailed view of a specific cosmetic for the player.
    static void
    openMainMenu(org.bukkit.entity.Player player, int page)
    Opens the main cosmetics menu for the player at the specified page.

    Methods inherited from class java.lang.Object

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

    • CosmeticsMenuCommand

      public CosmeticsMenuCommand(CosmeticsManager cosmeticsManager)
      Constructs a new CosmeticsMenuCommand.
      Parameters:
      cosmeticsManager - the CosmeticsManager instance
  • Method Details

    • openMainMenu

      public static void openMainMenu(org.bukkit.entity.Player player, int page)
      Opens the main cosmetics menu for the player at the specified page.
      Parameters:
      player - the player to open the menu for
      page - the page number (0-based)
    • openCosmeticView

      public static void openCosmeticView(org.bukkit.entity.Player player, Cosmetic cosmetic, int returnPage)
      Opens a detailed view of a specific cosmetic for the player.
      Parameters:
      player - the player to open the view for
      cosmetic - the cosmetic to view
    • onCommand

      public boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args)
      Handles the /cosmetics command, opening the menu or reloading cosmetics.
      Specified by:
      onCommand in interface org.bukkit.command.CommandExecutor
      Parameters:
      sender - the command sender
      command - the command
      label - the command label
      args - the command arguments
      Returns:
      true if the command was handled, false otherwise