Repository navigation
This update focuses on fixing several PlaceholderAPI edge cases and reducing overhead in frequently used placeholders.
Fixes
-
Fixed incorrect compact balance suffix selection for thousands, millions, trillions and quadrillions.
-
Fixed indexed rank/group placeholders accepting
0as a valid position. -
Fixed
%vault_groups_capital%and%vault_ranks_capital%not actually capitalizing group names. -
Unsupported permission placeholders are now handled correctly instead of silently resolving to an empty string.
-
Fixed incorrect error message when Permission/Chat providers are unavailable.
-
Corrected PlaceholderAPI formatting defaults:
us-number-formatis now stored as a boolean instead of a string.- thousands suffix now correctly defaults to
K.
Performance
Numeric placeholder parsing has been rewritten to use a small zero-allocation parser instead of Guava, temporary substrings, boxing and exception-based parsing.
Optimized placeholders include:
%vault_eco_balance_<N>dp%%vault_rankprefix_<N>%%vault_groupprefix_<N>%%vault_ranksuffix_<N>%%vault_groupsuffix_<N>%
Rank/group placeholders also parse their numeric indexes directly from known offsets instead of scanning the placeholder string for the last underscore.
In JMH testing, common short numeric inputs were around 5–18% faster, while malformed numeric input improved from roughly 700–900 ns to 1–18 ns.
Internal changes
- Removed Guava usage from placeholder number parsing.
- Replaced Guava
ImmutableMapwith JavaMap.offor PlaceholderAPI defaults. - Simplified compact balance formatting and removed the unnecessary
SuffixEntrymodel. - Updated the Gradle wrapper to 9.7.1.