Configuration
AstralStats reads three top-level YAML files plus a recursively-scanned blueprints/ tree. config.yml carries the two plugin-wide behaviour flags, resources.yml configures the ResourceType catalogue, and messages.yml carries the handful of player-facing strings not covered by Combat Mechanics or Stats & Modifiers. Everything reloads at runtime with /stats reload.
Data folder layout
blueprints/ is scanned recursively — BlueprintService.load() calls ConfigurationManager#loadFolder, which walks the whole tree and loads every file ending in .yml or .yaml regardless of depth. The shield/ subfolder shipped by default is pure organisation: any nesting works, and the file name itself is never read — only the key field inside each file matters.
config.yml
Field | Type | Default | Description |
|---|---|---|---|
| Duration |
| How long after taking damage a player is still considered |
| boolean |
| Suppresses the success feedback on stat/modifier/resource admin commands. |
Combat cooldown
CombatService records a timestamp on every hit (recordDamage) and answers isInCombat(UUID) by comparing System.currentTimeMillis() against that timestamp plus combat-cooldown. Once the cooldown elapses the entry is dropped and the player is out of combat again.
The only current consumer is resource regeneration: PlayerResource.regeneration() returns 0 whenever the owning player isInCombat and the resource's blueprint has off-combat-only: true — the shipped SHIELD resource is configured this way, so it stops regenerating for the duration of combat-cooldown after every hit. See Resources and Combat Mechanics.
Silent command success
When true, the following commands skip their success message (failure/validation messages, and /stats value's output, are unaffected):
Command | Suppressed feedback |
|---|---|
| "Set stat … to …" |
| "Reset stat … to its base value" |
|
|
| "Added timed modifier … to … for …ms" |
|
|
| "Added … of resource … to player …" |
| "Applied timed resource effect to …" |
See Commands for the full subcommand reference.
Stat blueprints (blueprints/)
Each file deserialises to a StatBlueprint:
Field | Type | Description |
|---|---|---|
| Key (namespaced) | The |
| Component (MiniMessage) | Shown wherever the stat is displayed. |
| double | Starting/reset value — |
| double | Clamp bounds. |
Clamping only applies when min < max (StatBlueprint#hasBonds()); a blueprint with min == max (or min > max) is unbounded and the computed value passes through unclamped.
Shipped blueprints
File | Key | Base | Min | Max |
|---|---|---|---|---|
|
| 50 | 0 | 500 |
|
| 50 | 0 | 500 |
|
| 50 | 0 | 500 |
|
| 1 | 0 | 500 |
These four are the only StatType entries that ship with a blueprint out of the box. Every other catalogued StatType (armor, critical chance, movement speed, …) exists as an enum constant but has no effect on any player until a matching blueprint file is added under blueprints/ — see the full catalogue on Stats & Modifiers.
resources.yml
resources.yml deserialises to a resources map keyed by ResourceType, each value a ResourceBlueprint (off-combat-only, type, max-stat, regeneration-stat, base-value). The shipped default configures only SHIELD:
See Resources for the full ResourceBlueprint field reference, the MAXIMUM/MISSING/FLAT regeneration formulas, and the ResourceType catalogue.
messages.yml
Key | Placeholders | Notes |
|---|---|---|
|
| Declared on |
|
| Sent by |
|
| Sent by |
| — | Sent immediately when |
| — | Sent after |
| — | Sent (and the exception logged) if |
Reloading
/stats reload calls AstralStats#loadConfiguration(), which:
Re-reads
config.ymlintoStatsConfigurationandresources.ymlintoResourcesConfiguration.Calls
BlueprintService#load()to re-walkblueprints/and merge the freshly parsed blueprints into the liveKey → StatBlueprintmap. This is additive — new and changed files take effect immediately, but a blueprint file that was deleted stays active (its old entry is never removed from the map) until the server restarts.Calls
StatService#reload(), which unloads and reloads every currently online player'sStatContainer— so updatedbase/min/max/display-namevalues and newly-added blueprints apply to online players immediately.Reloads
messages.ymlinto theStatsMessagesenum.
Note that resources.yml changes are not re-applied to already-connected players this way — a player's ResourceContainer is only (re)built on PlayerJoinEvent, so edits to resources.yml take effect for players who join after the reload, not for those already online.