Change Requirement Chat Color When Completed!
The config that you see above. all in the rankups.yml
!
requirements-not-met: |-
&4&m+ +
&cYou need
&c- {{rank.requirement('money').done ? '&d' : '&c'}}${{rank.requirement('money').progress | money}} / ${{rank.requirement('money').total | money}}
&cto rankup from &7&l%rankup_current_rank%&r&c to &e&l%rankup_next_rank%&r&c!
&4&m+ +
Let's break it down:
{{rank.requirement('money').done ? '&d' : '&c'}}
{{rank.requirement('money)
Specifies the target..done
Is a boolean, Meaning it outputstrue
orfalse
. In Rankup, it outputstrue
if the requirement is fulfilled.? '&d' : &c
This is the "picker" if the boolean (.done
) returnstrue
, it uses'&d'
and iffalse
then'&c'
.-
Recap: Placeholder checks if requirement is done or not and outputs the appropriate field (
'&d'
or'&c'
) accordingly.
{{rank.requirement('money').progress | money}}
- Amount player has.
{{rank.requirement('money').total | money}}
- The total amount required.
The important bit
{{rank.requirement('money').done ? '&d' : '&c'}}
How to change...
- The color when completed:
- Change the
'&d'
, Hex codes work.
- Change the
- The color when incomplete:
- Change the
'&c'
, Hex codes work.
- Change the
- The requirement:
- Change
'money'
.
- Change