Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
Add data folder for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziedelth committed Nov 7, 2022
1 parent cc8b430 commit 70c0d90
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/main/kotlin/fr/ziedelth/utils/plugins/JaisPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,17 @@ package fr.ziedelth.utils.plugins

import org.pf4j.Plugin
import org.pf4j.PluginWrapper
import java.io.File

abstract class JaisPlugin(pluginWrapper: PluginWrapper) : Plugin(pluginWrapper)
abstract class JaisPlugin(pluginWrapper: PluginWrapper) : Plugin(pluginWrapper) {
private val pluginsFolder = File("plugins")
get() {
if (!field.exists()) {
field.mkdirs()
}

return field
}

val dataFolder = File(pluginsFolder, pluginWrapper.pluginId)
}

0 comments on commit 70c0d90

Please sign in to comment.