Changed quest timer logic to set only after turning quest in.
Fixed null error when opening quest GUI using MySQL.
Placeholder API logic for quest requirements.
Note: or placeholders returning a number such as player level, kills, etc the required number set is a minimum. In the example below the player requires minimum level of 10.
Suggestion: NEW REQUIREMENT FOR QUESTS
PlaceholderAPI Match: Complete the quest if the Placeholder matches the value in quests.yml
Examples:
Requirements: ["PAPI:%player_level%", 10]
Requirements: ["PAPI:%player_is_op%", "yes"]
Requirements: ["PAPI:%player_gamemode%", "survival"]
Example quests.yml:
Code (Text):
Quest1: # This can be anything - no duplicates
# Quest title
Title: "&dQuest1"
# Quest GUI Object
Button: STICK
# Cooldown - set to 0 for no cool down
Cooldown: 300 # 5 minutes
# Quest completion limit
Limit: -1 # No limit
# Quest lore
Lore:
- "&fGIVE ME COAL"
- "&dRight click to turn in quest"
- "&cRequirements: 10 Coal, 5 Iron Ore"
- "&e&lRewards: 300 Dollars, 3 Raindrops, 1 Diamond, 1 MelonWand"
# Format: <Requirement, Amount>
# Note: Only accepts vanilla items
Requirements: ["PAPI:%player_level%", 10, "PAPI:%player_is_op%", "yes", "PAPI:%player_gamemode%", "survival", COAL, 10, IRON_ORE, 5]
# Quest money reward
Economy:
# Current rewards (-1 to disable)
Vault: 300 # Your economy currency
Currency: 3 # Plugin currency - Set the currency name in the config
# Format: <Reward>, <Number>
# Number = amount if material or number of times the command will run
# Command Format: CMD:<command>
Reward: [DIAMOND, 1, "CMD:/rq melonwand %player_name% 10", 1]
# Message upon completing a quest
Messages:
Discord: false
Logger: false
Broadcast: false
Player: false
Completed: "%player_name% completed Quest1!"