mirror of
https://github.com/Auxilor/EcoJobs.git
synced 2025-12-21 16:09:18 +00:00
Fixed leaderboard placeholders updating
This commit is contained in:
@@ -38,6 +38,7 @@ import org.bukkit.Bukkit
|
|||||||
import org.bukkit.OfflinePlayer
|
import org.bukkit.OfflinePlayer
|
||||||
import org.bukkit.entity.Player
|
import org.bukkit.entity.Player
|
||||||
import org.bukkit.inventory.ItemStack
|
import org.bukkit.inventory.ItemStack
|
||||||
|
import java.time.Duration
|
||||||
import java.util.DoubleSummaryStatistics
|
import java.util.DoubleSummaryStatistics
|
||||||
import java.util.Objects
|
import java.util.Objects
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
@@ -47,7 +48,9 @@ import kotlin.math.max
|
|||||||
class Job(
|
class Job(
|
||||||
val id: String, val config: Config, private val plugin: EcoJobsPlugin
|
val id: String, val config: Config, private val plugin: EcoJobsPlugin
|
||||||
) {
|
) {
|
||||||
private val topCache = Caffeine.newBuilder().build<Int, LeaderboardCacheEntry?>()
|
private val topCache = Caffeine.newBuilder()
|
||||||
|
.expireAfterWrite(Duration.ofSeconds(plugin.configYml.getInt("leaderboard-cache-lifetime").toLong()))
|
||||||
|
.build<Int, LeaderboardCacheEntry?>()
|
||||||
|
|
||||||
val name = config.getFormattedString("name")
|
val name = config.getFormattedString("name")
|
||||||
val description = config.getFormattedString("description")
|
val description = config.getFormattedString("description")
|
||||||
|
|||||||
@@ -312,6 +312,7 @@ point-names: # If you have point names that look ugly (eg g_souls) then you can
|
|||||||
|
|
||||||
use-faster-move-trigger: true # Disable if you want move trigger to detect sub-1-block movements
|
use-faster-move-trigger: true # Disable if you want move trigger to detect sub-1-block movements
|
||||||
raytrace-distance: 80 # The distance that alt_click should check for a location
|
raytrace-distance: 80 # The distance that alt_click should check for a location
|
||||||
|
leaderboard-cache-lifetime: 180 # How often will top placeholders update their cache (in seconds)
|
||||||
|
|
||||||
potions:
|
potions:
|
||||||
icon:
|
icon:
|
||||||
|
|||||||
Reference in New Issue
Block a user