px32-bot/src/main/kotlin/net/projecttl/p/x32/DefaultConfig.kt
2024-09-19 00:51:42 +09:00

16 lines
368 B
Kotlin

package net.projecttl.p.x32
import java.util.*
import kotlin.reflect.KProperty
private class DefaultConfigDelegate {
private val props = Properties()
init {
props.load(this.javaClass.getResourceAsStream("/default.properties"))
}
operator fun getValue(thisRef: Any?, property: KProperty<*>): String {
return props.getProperty(property.name).toString()
}
}