Placeholder quest
Since the 2.1.0, you can create quests that requires a placeholder to be a specific value. This functionnality is only compatible with PlaceholderAPI at the moment.
On a placeholder quest, you need to specify a placeholder, an operator, an expected value and an error message.
Classical types
There is currently the following operators:
EQUALS
The value of the parsed placeholder must be equal to the required value.
TEXT
NOT_EQUALS
The value of the parsed placeholder must be different of the required value.
TEXT
GREATER_THAN
The value of the parsed placeholder must be greater than the required value.
NUMBER
GREATER_THAN_OR_EQUALS
The value of the parsed placeholder can be greater or equal to the required value.
NUMBER
LESS_THAN
The value of the parsed placeholder must be lower than the required value.
NUMBER
LESS_THAN_OR_EQUALS
The value of the parsed placeholder can be lower or equal to the required value.
NUMBER
Here is some examples:
1:
name: "Be rich"
menu_item: PAPER
description:
- "&cGet more than 1,000,000$."
- "&aWin &b50 000 &a$."
quest_type: PLACEHOLDER
placeholder:
value: ""%vault_eco_balance%"
operator: GREATER_THAN
expected: 1000000
error_message: "&cYou need more than 1,000,000$ to complete this quest."
reward:
reward_type: MONEY
amount: 50000
2:
name: "Be a VIP"
menu_item: GOLD_INGOT
description:
- "&6Become a VIP and..."
- "&6show it to the world."
quest_type: PLACEHOLDER
placeholder:
value: ""%luckperms_in_group_vip%"
operator: EQUALS
expected: "true"
error_message: "&cYou are not a VIP!"
reward:
reward_type: COMMAND
commands:
- "bc &6%player% &bis now a VIP!"
Compare durations
In addition, you can compare durations returned by placeholders using the following types :
DURATION_GREATER_THAN
hh:mm:ss:SSS
DURATION_GREATER_THAN_OR_EQUALS
hh:mm:ss:SSS
DURATION_LESS_THAN
hh:mm:ss:SSS
DURATION_LESS_THAN_OR_EQUALS
hh:mm:ss:SSS
hh
are hours, mm
are minutes, ss
are seconds and SSS
are milliseconds.
Here is an example :
1:
name: "Be fast"
menu_item: PAPER
description:
- "&cComplete the parkour in under 25 seconds."
- "&aWin &b50 000 &a$."
quest_type: PLACEHOLDER
placeholder:
value: "%parkour_player_best_time%"
operator: DURATION_LESS_THAN_OR_EQUALS
expected: "00:00:25:000"
error_message: "&cYou are too slow! You must be under 25 seconds."
reward:
reward_type: MONEY
amount: 50000
Last updated