Small refactoring

This commit is contained in:
grimsi
2024-10-31 09:07:46 +01:00
parent f89086a06d
commit 5ebd074d3b
8 changed files with 34 additions and 40 deletions
@@ -1,7 +1,18 @@
package de.grimsi.gameyfin.pluginapi.core
interface GameyfinPlugin {
fun getConfigMetadata(): List<PluginConfigElement>
fun getCurrentConfig(): Map<String, String?>
fun loadConfig(config: Map<String, String?>)
import org.pf4j.Plugin
import org.pf4j.PluginWrapper
abstract class GameyfinPlugin(wrapper: PluginWrapper) : Plugin(wrapper) {
abstract val configMetadata: List<PluginConfigElement>
protected open var config: Map<String, String?> = emptyMap()
open fun getCurrentConfig(): Map<String, String?> {
return config
}
open fun loadConfig(config: Map<String, String?>) {
this.config = config
}
}