Reference

SettingsTab

One tab a plugin module opens on its page in the settings screen.

public record SettingsTab(String id, String name, List<HudModuleSetting> settings), in com.eymistaken.simplecps.api, since 1.2.0. A module returns a list of them from getSettingsTabs().

Components

String id()since 1.2.0

A stable key for the tab. The settings screen remembers which tab you were on by it, so keep it constant across calls. It is made unique per page, so a repeat is renumbered rather than fatal.

String name()since 1.2.0

Shown on the tab strip, upper-cased for you to match the built-in pages. Falls back to id when blank.

List<HudModuleSetting> settings()since 1.2.0

The rows on the tab, in order.

No validation, on purpose

The record checks nothing. A constructor that rejected nulls would throw inside your own getSettingsTabs() call, and the screen would then lose every tab instead of the one bad entry.

The settings screen tolerates bad entries instead: a tab with nothing it can draw is dropped, and a duplicate id is renumbered. Your own tabs covers what the page does with the rest.