File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
plugin-shared/src/main/kotlin/app/simplecloud/plugin/api/shared/config Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,19 @@ import java.io.File
1111import java.nio.file.*
1212import kotlin.coroutines.CoroutineContext
1313
14+ /* *
15+ * A configuration factory that loads, saves and watches configuration files.
16+ * The factory automatically reloads the configuration when the file changes.
17+ *
18+ * Usage:
19+ * ```
20+ * // Using create
21+ * val factory = ConfigFactory.create<MyConfig>(File("config.yaml"))
22+ *
23+ * // Using create with custom coroutineContext
24+ * val factory = ConfigFactory.create<MyConfig>(File("config.json"), Dispatchers.Default)
25+ * ```
26+ */
1427class ConfigFactory (
1528 private val file : File ,
1629 private val configClass : Class <* >,
You can’t perform that action at this time.
0 commit comments