This commit is contained in:
2026-05-26 23:16:33 -04:00
commit 3b023d3c6b
32 changed files with 2931 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
# Configuration
## Location
`<plugin data dir>/config.json`. Written with defaults on first boot.
## Full config
```json
{
"tables": {
"ranks": "ranks",
"rank_perms": "ranks_perms",
"user_perms": "ranks_user_perms",
"grants": "ranks_grants"
},
"provider": {
"replace_default": true
},
"chat": {
"inject_prefix": true,
"prefix_format": "{prefix} "
},
"cache": {
"invalidate_channel": "ranks.invalidate"
}
}
```
## Fields
### tables
Table names. Change only if you must coexist with another schema that already uses these names.
### provider
| Field | Default | Meaning |
|---|---|---|
| `replace_default` | `true` | When true, on `start()` we remove every existing PermissionProvider from `PermissionsModule` (including Hytale's default file-backed one) and register ours as the sole authority. When false, we add ours alongside - useful for migration, but expect duplicate answers from both providers (Hytale OR's results across providers). On `shutdown()` we restore whichever providers we removed. |
### chat
| Field | Default | Meaning |
|---|---|---|
| `inject_prefix` | `true` | Toggle the PlayerChatEvent formatter rewrite. False = no prefix injection regardless of rank prefix. |
| `prefix_format` | `"{prefix} "` | Format string. `{prefix}` is replaced with the player's primary rank prefix. Result is prepended to `<username>: <message>`. |
### cache
| Field | Default | Meaning |
|---|---|---|
| `invalidate_channel` | `"ranks.invalidate"` | NetworkCore MessageBus channel for cross-server cache-invalidation events. Don't share this with another plugin. |
## No env var overrides
This plugin doesn't load any secrets from env. MySQL credentials live in NetworkCore (`MYSQL_PASSWORD`).