Class MenuRegistry

java.lang.Object
com.xyrisdev.cloud.api.menu.MenuRegistry

public final class MenuRegistry extends Object
  • Method Details Link icon

    • register Link icon

      public static void register(MenuType type, MenuProvider provider)
      Registers a menu type with its corresponding provider.

      This allows a menu type to be associated with a specific provider that handles its logic and display.

      Parameters:
      type - The type of menu to register.
      provider - The provider responsible for handling the menu's logic and opening it for players.
    • open Link icon

      public static void open(MenuType type, org.bukkit.entity.Player player, Object... args)
      Opens the menu for a player based on the specified menu type.

      If no provider is found for the given menu type, the player is notified with an error message.

      Parameters:
      type - The type of menu to open.
      player - The player to open the menu for.
      args - Optional arguments passed to the menu provider.