Adding PAPI Requirements

It's possible to use a PAPI placeholder as a requirement with the format - 'placeholder <PAPI Placeholder>'.

example:
  rank: 'currentRank'
  next: 'nextRank'
  requirements: # %statistic_hours_played% is from the PAPI ecloud via /papi ecloud download Statistic
    - 'placeholder %statistic_hours_played% >= 12'
  rankup:
    requirements-not-met: |-
      You need:
      {{ rank.requirement('placeholder', 'statistic_hours_played').total | simple }} hours of playtime.
      to rank up to {{ next.rank }}!

IMPORTANT: Make sure the plugin you want to use supports PlaceholderAPI (PAPI), if it doesn't you won't be able to use it.

Placeholders can be found from the PAPI github wiki/ecloud. The placeholder needs to output a raw number.
That means no periods, dots, or commas.
For example, if the placeholder outputs it like this it won't work:
1000 = 1,000 or 1000.00
Only whole, unformatted numbers will work.
Now onto the syntax. This is the template:

Template
RankName:
  rank: 'currentRank'
  next: 'nextRank'
  requirements:
    - 'placeholder <placeholder> <operation> <number>'

Important things to note:

  • when using a placeholder, write placeholder in front of it so Rankup knows it's a placeholder.
  • <placeholder> is where your placeholder goes. Again, unformatted numbers only.
  • <operation> is where you specify what should be checked for. See below for a list of operations.
  • <number> is the number that will be used by the operation.

Operations

All of the following operations will be explained assuming the syntax above is used.
> greater than
< smaller than
>= equal to or greater than (recommended)
<= smaller or equal to
= equal to/matches
== exact match (not recommended)

An Example Operation:
RankName:
  rank: 'currentRank'
  next: 'nextRank'
  requirements:
    - 'placeholder %statistic_hours_since_death% >= 5'

Need more customization? If you can write Java, see Developers