9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2026-01-04 15:41:36 +00:00

Level key is no longer lazy-loaded

This commit is contained in:
Auxilor
2024-08-25 17:36:15 +01:00
parent ab9c62a00f
commit c530f523f5

View File

@@ -27,15 +27,13 @@ abstract class Levellable(
val config: Config,
protected val plugin: EcoSkillsPlugin
) : KRegistrable {
open val startLevel = 0
val startLevel = 0
private val key by lazy {
PersistentDataKey(
plugin.createNamespacedKey(id),
PersistentDataKeyType.INT,
startLevel
)
}
private val key = PersistentDataKey(
plugin.createNamespacedKey(id),
PersistentDataKeyType.INT,
startLevel
)
// Not the best way to do this, but it works!
private val leaderboardCache = Caffeine.newBuilder()