Skip to content

Andre601/Formatter-Expansion

Repository files navigation

Formatter Expansion

discord revolt

Important

The Formatter expansion uses Paper 1.19.3 and therefore builds against Java 17.
This makes it incompatible with older Java Distributions. Older Minecraft versions may be supported, but it isn't guaranteed.

Please make sure to use at least Java 17 or else you may get a UnsupportedClassVersionError when it loads.

Placeholders

The Formatter expansion currently offers the following placeholders:

An explanation of the placeholder pages is found in the placeholders folder

External placeholder support

The expansion allows you to use placeholders from other expansions such as the Player expansion.
To use a placeholder, make sure to use the bracket-format instead of the percent one (i.e. {player_name} instead of %player_name%).

Config options

The expansion adds a few options to the config.yml of PlaceholderAPI.
They can be found under expansions.formatter.

Option Description

formatting.pattern

The default DecimalFormat to use for the format placeholder.
Type: String
Default: #,###,###.##

formatting.locale

The country code to use for the decimal format.
You need to replace _ with -
Type: String
Default: en-US

shorten.thousands

The letter used to indicate thousands.
Type: String
Default: K

shorten.millions

The letter used to indicate millions.
Type: String
Default: M

shorten.billions

The letter used to indicate billions.
Type: String
Default: B

shorten.trillions

The letter used to indicate trillions.
Type: String
Default: T

shorten.quadrillions

The letter used to indicate quadrillions.
Type: String
Default: Q

time.condensed

Whether the time returned by the time placeholder should not have any spaces.
Type: Boolean
Default: false

time.days

The text used to indicate days.
Type: String
Default: d

time.hours

The text used to indicate hours.
Type: String
Default: h

time.minutes

The text used to indicate minutes.
Type: String
Default: m

time.seconds

The text used to indicate seconds.
Type: String
Default: s

time.milliseconds

The text used to indicate milliseconds.
Type: String
Default: ms

rounding.mode

The default rounding mode to use if no mode was defined in the rounding placeholder.

Available modes:
  • up
  • down
  • ceiling
  • floor
  • half-up
  • half-down
  • half-even
Type: String
Default: half-up

rounding.precision

Default number of decimal points to display when no precision was defined the rounding placeholder.
Type: Number (0 ≤ x)
Default: 0