Class SettingsPageRegistry
java.lang.Object
com.soulfiremc.server.settings.lib.SettingsPageRegistry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddInternalPage(Class<? extends SettingsObject> clazz, String id, String pageName, String iconId) Registers an internal class with the settings registry.addPluginPage(Class<? extends SettingsObject> clazz, String id, String pageName, Plugin owningPlugin, String iconId, BooleanProperty<?> enabledProperty) Registers an internal class with the settings registry.Exports all settings definitions as a flat list.Exports page definitions that reference settings by identifier.
-
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 registerid- The unique page identifier (URL-safe)pageName- The display name of the pageiconId- 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 registerid- The unique page identifier (URL-safe)pageName- The name of the pageowningPlugin- The owning pluginiconId- The icon id Icons ids are from lucide.dev- Returns:
- The registry
-
exportSettingsDefinitions
Exports all settings definitions as a flat list. These can be rendered anywhere by their identifier (namespace + key). -
exportSettingsPages
Exports page definitions that reference settings by identifier. Pages provide grouping and ordering of settings. -
exportRegisteredPlugins
-