private MainClassName plugin; public currentClassname(MainClassName instance) { plugin = instance; } // you can then use your plugin as the plugin variable