Problem
The `generic.toml` file contains 27+ checks in a flat list with no organizational structure. As users add custom checks, it becomes hard to navigate and maintain. A user reported that they tried adding category separators but it crashed the plugin (likely because the parser treats every top-level key as a check).
Root cause: `ConfigsManager.loadGenericChecks()` iterates all top-level TOML keys and tries to parse each one as a `GenericCheck`. There's no way to add organizational metadata without it being parsed as a check.
Suggested approach
Add an optional `category` field to each check entry:
[labymod_v1]
actions = ["alert"]
channels = ["LABYMOD"]
name = "Labymod v1"
category = "clients"
[forge]
actions = ["alert"]
channels = ["MC|Brand", "minecraft:brand"]
message_has = "forge"
name = "Forge"
category = "loaders"
[my_custom_check]
actions = ["alert"]
channels = ["custom:channel"]
name = "My Custom Check"
category = "custom"
Changes needed:
- Add a `category` field to `GenericCheck.java` (default to `"other"` if not specified)
- Parse the field in `ConfigsManager.loadGenericChecks()`
- Optionally group checks by category in the `/hs inv` and `/hs check` output
This is backward-compatible: existing configs without `category` fields will still work.
Relevant files
- `hackedserver-core/src/main/resources/generic.toml`
- `hackedserver-core/src/main/java/org/hackedserver/core/config/GenericCheck.java`
- `hackedserver-core/src/main/java/org/hackedserver/core/config/ConfigsManager.java`
Problem
The `generic.toml` file contains 27+ checks in a flat list with no organizational structure. As users add custom checks, it becomes hard to navigate and maintain. A user reported that they tried adding category separators but it crashed the plugin (likely because the parser treats every top-level key as a check).
Root cause: `ConfigsManager.loadGenericChecks()` iterates all top-level TOML keys and tries to parse each one as a `GenericCheck`. There's no way to add organizational metadata without it being parsed as a check.
Suggested approach
Add an optional `category` field to each check entry:
Changes needed:
This is backward-compatible: existing configs without `category` fields will still work.
Relevant files