com.skillw.pouvoir.internal.feature.database.redis.RedisUserContainer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Pouvoir Show documentation
Show all versions of Pouvoir Show documentation
Bukkit Script Engine Plugin.
package com.skillw.pouvoir.internal.feature.database.redis
import com.skillw.pouvoir.api.feature.database.UserBased
import taboolib.expansion.SingleRedisConnection
/**
* @className MongoContainer
*
* @author Glom
* @date 2023/1/12 23:00 Copyright 2024 Glom.
*/
class RedisUserContainer(key: String, holder: RedisContainerHolder, connection: SingleRedisConnection) :
RedisContainer(key, holder, connection), UserBased {
override fun get(user: String, key: String): String? {
return connection["$user-$key"]
}
override fun delete(user: String, key: String) {
connection.delete(key)
}
override fun set(user: String, key: String, value: String?) {
connection["$user-$key"] = value
}
override fun contains(user: String, key: String): Boolean {
return connection.contains("$user-$key")
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy