Compare commits

..

4 Commits

Author SHA1 Message Date
Auxilor
7ff3eeef06 Updated to 6.22.3 2022-02-01 19:09:24 +00:00
Auxilor
58faf6de23 Fixed more server profile issues 2022-02-01 19:09:10 +00:00
Auxilor
7f42cbe32e Updated to 6.22.2 2022-02-01 18:55:18 +00:00
Auxilor
ae12ab17fe Fixed server profile 2022-02-01 18:55:07 +00:00
3 changed files with 7 additions and 5 deletions

View File

@@ -1,6 +1,8 @@
package com.willfp.eco.internal.spigot.data
import com.willfp.eco.core.data.PlayerProfile
import com.willfp.eco.core.data.Profile
import com.willfp.eco.core.data.ServerProfile
import com.willfp.eco.core.data.keys.PersistentDataKey
import com.willfp.eco.internal.spigot.data.storage.DataHandler
import java.util.UUID
@@ -10,7 +12,7 @@ abstract class EcoProfile(
val data: MutableMap<PersistentDataKey<*>, Any>,
val uuid: UUID,
private val handler: DataHandler
) : PlayerProfile {
) : Profile {
override fun <T : Any> write(key: PersistentDataKey<T>, value: T) {
this.data[key] = value
@@ -50,7 +52,7 @@ class EcoPlayerProfile(
data: MutableMap<PersistentDataKey<*>, Any>,
uuid: UUID,
handler: DataHandler
) : EcoProfile(data, uuid, handler) {
) : EcoProfile(data, uuid, handler), PlayerProfile {
override fun toString(): String {
return "EcoPlayerProfile{uuid=$uuid}"
}
@@ -59,7 +61,7 @@ class EcoPlayerProfile(
class EcoServerProfile(
data: MutableMap<PersistentDataKey<*>, Any>,
handler: DataHandler
) : EcoProfile(data, serverProfileUUID, handler) {
) : EcoProfile(data, serverProfileUUID, handler), ServerProfile {
override fun toString(): String {
return "EcoServerProfile"
}

View File

@@ -39,7 +39,7 @@ class EcoProfileHandler(
}
override fun saveKeysFor(uuid: UUID, keys: Set<PersistentDataKey<*>>) {
val profile = PlayerProfile.load(uuid)
val profile = loadGenericProfile(uuid)
for (key in keys) {
handler.write(uuid, key.key, profile.read(key))

View File

@@ -1,3 +1,3 @@
version = 6.22.1
version = 6.22.3
plugin-name = eco
kotlin.code.style = official