Class SettingsPageRegistry

java.lang.Object
com.soulfiremc.server.settings.lib.SettingsPageRegistry

public final class SettingsPageRegistry extends Object
  • Constructor Details

    • SettingsPageRegistry

      public SettingsPageRegistry()
  • Method Details

    • addInternalPage

      @Internal public SettingsPageRegistry addInternalPage(Class<? extends SettingsObject> clazz, String id, String pageName, String iconId)
      Registers an internal class with the settings registry. This is for classes associated to internal settings. They need to be handled explicitly by the client.
      Parameters:
      clazz - The class to register
      id - The unique page identifier (URL-safe)
      pageName - The display name of the page
      iconId - The icon id Icons ids are from lucide.dev
      Returns:
      The registry
    • addPluginPage

      public SettingsPageRegistry addPluginPage(Class<? extends SettingsObject> clazz, String id, String pageName, Plugin owningPlugin, String iconId, BooleanProperty<?> enabledProperty)
      Registers an internal class with the settings registry. This is normally used for plugins, provide your plugin info to register the settings to your plugin.
      Parameters:
      clazz - The class to register
      id - The unique page identifier (URL-safe)
      pageName - The name of the page
      owningPlugin - The owning plugin
      iconId - The icon id Icons ids are from lucide.dev
      Returns:
      The registry
    • exportSettingsDefinitions

      public List<SettingsDefinition> exportSettingsDefinitions()
      Exports all settings definitions as a flat list. These can be rendered anywhere by their identifier (namespace + key).
    • exportSettingsPages

      public List<SettingsPage> exportSettingsPages()
      Exports page definitions that reference settings by identifier. Pages provide grouping and ordering of settings.
    • exportRegisteredPlugins

      public List<ServerPlugin> exportRegisteredPlugins()