PAR-272
Balance-tax bracket keys are decimals in shipped config.yml → silently ignored (Treasury + Business)
Found during the economy-explorer docs accuracy sweep; confirmed by a live Paper YamlConfiguration probe.
Problem: Both shipped configs define the balance-tax brackets with DECIMAL keys:
- treasury/src/main/resources/config.yml:67-72 (
0.00,100000.00,200000.00,300000.00,500000.00) - business/src/main/resources/config.yml:34-39 (same)
BalanceTaxConfiguration.load() reads the bracket section via getConfigurationSection("tax.balance.brackets").getKeys(false) then new BigDecimal(key) / getString(key). Snakeyaml/Bukkit parses a decimal-looking key like 100000.00 as a NESTED path (100000 → section → 00), so getKeys(false) returns [0, 100000, 200000, ...] as sections, getString(key) is null, and every bracket is skipped — the map falls back to the hardcoded DEFAULT_BRACKETS.
Why it's currently invisible: DEFAULT_BRACKETS has the same values as the shipped config, so effective taxation is correct. But any admin who edits these bracket values is silently ignored — the documented config doesn't work. (Both economy-explorer config docs already WARN that keys must be integers; the shipped configs violate that warning.)
Fix options: (a) ship integer keys (100000: etc.) in both config.yml files — matches the docs and makes edits take effect; and/or (b) make the loader tolerant: read the bracket section as a flat map / accept decimal-string keys. Recommend (a) at minimum, in both treasury and business (shared pattern). Add a test that a non-default bracket edit actually changes the computed tax.
Components: Treasury and Business (same bug in both).
Resources
- PR#2 Last major release ParadauxIO/hibernia-economy
- commit751cdb9 Fix balance-tax bracket keys: whole numbers, not decimals (PAR-272)ParadauxIO/hibernia-economy
Comments
No comments yet.
Activity
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- ParadauxIO linked a pull request — PR #2 open — Last major release
- tesks changed status to Status → Pending Release
- ParadauxIO linked a commit — Commit 751cdb9 — Fix balance-tax bracket keys: whole numbers, not decimals (PAR-272)
- tesks created the issue