mirror of
https://github.com/Auxilor/EcoJobs.git
synced 2025-12-23 17:09:27 +00:00
Fixed JobXPAccumulator
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.willfp.ecojobs.jobs
|
||||
|
||||
import com.willfp.ecojobs.api.giveJobExperience
|
||||
import com.willfp.ecojobs.api.hasJobActive
|
||||
import com.willfp.libreforge.counters.Accumulator
|
||||
import org.bukkit.entity.Player
|
||||
|
||||
@@ -8,6 +9,10 @@ class JobXPAccumulator(
|
||||
private val job: Job
|
||||
) : Accumulator {
|
||||
override fun accept(player: Player, count: Double) {
|
||||
if (!player.hasJobActive(job)) {
|
||||
return
|
||||
}
|
||||
|
||||
player.giveJobExperience(job, count)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#libreforge-updater
|
||||
#Tue Mar 28 15:57:37 BST 2023
|
||||
#Tue Mar 28 16:06:44 BST 2023
|
||||
kotlin.code.style=official
|
||||
libreforge-version=4.0.0
|
||||
version=3.0.0
|
||||
|
||||
Reference in New Issue
Block a user