mirror of
https://github.com/Auxilor/EcoQuests.git
synced 2025-12-19 15:09:22 +00:00
FIX: Stop giving exp to task and call steps related to it when task already marked as completed
This commit is contained in:
@@ -146,6 +146,11 @@ class Task(
|
||||
* Give experience directly
|
||||
*/
|
||||
fun giveExperience(player: Player, amount: Double) {
|
||||
|
||||
if (player.profile.read(hasCompletedKey)) {
|
||||
return
|
||||
}
|
||||
|
||||
val requiredXp = getExperienceRequired(player)
|
||||
val newXp = player.profile.read(xpKey) + amount
|
||||
|
||||
|
||||
Reference in New Issue
Block a user