Package net.storm.api.plugins.config
Annotation Interface ConfigTitle
Annotation that defines a title/heading within the configuration panel.
Titles are used to create visual separation and organization within sections. They display as headers that group related configuration items without the collapsible behavior of sections.
To define a title, annotate a String field in your Config interface:
@ConfigGroup("myplugin")
public interface MyConfig extends Config {
@ConfigSection(
name = "Settings",
description = "Plugin settings",
position = 1
)
String settingsSection = "Settings";
@ConfigTitle(
name = "Combat Options",
description = "Options related to combat",
position = 1,
section = "Settings"
)
String combatTitle = "Combat";
@ConfigItem(
keyName = "autoRetaliate",
name = "Auto Retaliate",
description = "Automatically fight back",
section = "Settings",
title = "Combat" // References the title
)
default boolean autoRetaliate() {
return true;
}
}
- See Also:
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionA description of what this title group contains.The display name of the title.intThe display position of this title within its section. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether this title should be hidden from the UI.The key name for this title.The section this title belongs to.The parent title this title belongs to.The key name of a config item that controls this title's visibility.
-
Element Details
-
name
String nameThe display name of the title.- Returns:
- the title text shown in the UI
-
description
String descriptionA description of what this title group contains.Displayed as a tooltip when hovering over the title.
- Returns:
- the title description
-
position
int positionThe display position of this title within its section.Titles and items are sorted by position in ascending order.
- Returns:
- the position value
-
title
String titleThe parent title this title belongs to.Allows creating nested title hierarchies.
- Returns:
- the parent title field name, or empty string for top-level
- Default:
""
-
keyName
String keyNameThe key name for this title.If not specified, uses the field name as the key.
- Returns:
- the key name, or empty string to use field name
- Default:
""
-
section
String sectionThe section this title belongs to.Specify the section field name defined with
ConfigSection.- Returns:
- the section field name, or empty string for no section
- Default:
""
-
unhide
String unhideThe key name of a config item that controls this title's visibility.When the specified item's value is truthy, this title becomes visible.
- Returns:
- the controlling item's key name, or empty string
- Default:
""
-