Requirements
Methods tell the placeholder engine what part of the result you want.
Only methods used to display a value regarding a requirement are listed below. For more or different methods, refer to the Placeholder Engine page.
Method | Description | Example |
---|---|---|
done | True or false depending on if the requirement is complete. | {{ rank.requirement('money').done }} |
total | Displays total amount required. | {{ rank.requirement('money').total }} |
progress | Amount done of a requirement. | {{ rank.requirement('money').progress }} |
remaining | Amount left of a requirement. | {{ rank.requirement('money').remaining }} |
percent | Goes from 0 to 100. | {{ rank.requirement('money').percent }} |
quotient | Like percent, but goes from 0 to 1. | {{ rank.requirement('money').quotient }} |
Filters
The pipe symbol
|
and the filter name will apply it.
Filters alter a result's output.
The number formatting ofsimple
,money
andpercent
are customizable in theplaceholders:
section of config.yml.
Filter | Description | Example |
---|---|---|
simple | Formats result to be whole numbers. | {{ rank.requirement('xp-level').total | simple }} |
percent | Formats result to be ##.#. Use with percent method. | {{ rank.requirement('money').percent | percent }} |
money | Formats result to be ###,###.##. | {{ rank.requirement('money').total | money }} |
shortmoney | Formats result to a letter | {{rank.requirement('money').total | shortmoney }} |
Using filters is recommended for displaying any non-integer number, otherwise the formatting may be too exact (for example, 0.2000000001
or 4.0
). The simple
filter is recommended for most use cases.