I've been using the Kotlin with the Bukkit framework and so far it has been great. I am having one major issue though. Bukkit requires that the main plugin class be a class, so that spigot can create an instance of it.

I am writing a library for Kotlin with the Bukkit framework since it was originally written in Java. The main problem I have is that nearly all methods require an instance of the JavaPlugin class, but I don't want to use dependency injection. Having an object, or static access to the JavaPlugin instance would solve this problem.

Is there any way that I can create some sort of wrapper or something of that nature to delegate the behavior of the class to an object?