9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2026-01-06 15:51:52 +00:00

Fixed deprecated methods

This commit is contained in:
Auxilor
2022-10-01 13:08:01 +01:00
parent 13a5e7ad60
commit d962faeb6a
5 changed files with 6 additions and 6 deletions

View File

@@ -187,7 +187,7 @@ private val gainSoundKey = PersistentDataKey(
plugin.namespacedKeyFactory.create("gainSound"),
PersistentDataKeyType.BOOLEAN,
true
).player()
)
fun OfflinePlayer.hasGainSoundEnabled(): Boolean {
return this.profile.read(gainSoundKey)

View File

@@ -43,6 +43,6 @@ class CommandToggleActionbar(plugin: EcoPlugin) : Subcommand(
NamespacedKeyUtils.create("ecoskills", "actionbar_enabled"),
PersistentDataKeyType.BOOLEAN,
true
).player()
)
}
}

View File

@@ -30,7 +30,7 @@ abstract class Effect(
plugin.namespacedKeyFactory.create(id),
PersistentDataKeyType.INT,
0
).player()
)
val uuid: UUID = UUID.nameUUIDFromBytes(id.toByteArray())
lateinit var config: Config

View File

@@ -37,12 +37,12 @@ abstract class Skill(
plugin.namespacedKeyFactory.create(id),
PersistentDataKeyType.INT,
0
).player()
)
val dataXPKey = PersistentDataKey(
plugin.namespacedKeyFactory.create("${id}_xp"),
PersistentDataKeyType.DOUBLE,
0.0
).player()
)
val config: Config = SkillConfig(this.id, this.javaClass, plugin)
val xpRequirements = config.getInts("level-xp-requirements")
lateinit var name: String

View File

@@ -36,7 +36,7 @@ abstract class Stat(
plugin.namespacedKeyFactory.create(id),
PersistentDataKeyType.INT,
0
).player()
)
lateinit var config: Config
lateinit var name: String