We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f11f3ad commit fa79337Copy full SHA for fa79337
src/main/kotlin/cc/modlabs/kpaper/main/KPluginExtensions.kt
@@ -0,0 +1,9 @@
1
+package cc.modlabs.kpaper.main
2
+
3
+/**
4
+ * Docs-friendly configuration loader stub. Returns a new instance of T using the no-arg constructor.
5
+ * Replace with your own implementation or bind to your config library.
6
+ */
7
+inline fun <reified T : Any> KPlugin.loadConfiguration(): T =
8
+ T::class.java.getDeclaredConstructor().newInstance()
9
0 commit comments