Skip to content

Commit fa79337

Browse files
committed
feat: Add docs-friendly configuration loader stub
1 parent f11f3ad commit fa79337

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)