Class CategoryRegistry

java.lang.Object
com.soulfiremc.server.script.CategoryRegistry

public final class CategoryRegistry extends Object
Registry of all available node categories. Provides predefined categories and lookup methods.
  • Field Details

  • Method Details

    • register

      public static NodeCategory register(NodeCategory category)
      Registers a category.
      Parameters:
      category - the category to register
      Returns:
      the registered category (for chaining)
    • fromId

      public static NodeCategory fromId(String id)
      Gets a category by its ID, or UTILITY as fallback.
      Parameters:
      id - the category ID
      Returns:
      the category, or UTILITY if not found
    • isRegistered

      public static boolean isRegistered(String id)
      Checks if a category is registered.
      Parameters:
      id - the category ID
      Returns:
      true if the category is registered
    • allSorted

      public static List<NodeCategory> allSorted()
      Gets all registered categories sorted by sort order.
      Returns:
      sorted list of all categories
    • getRegisteredCount

      public static int getRegisteredCount()
      Gets the number of registered categories.
      Returns:
      the count of registered categories