> ## Documentation Index
> Fetch the complete documentation index at: https://kotly-doc.voxray.su/llms.txt
> Use this file to discover all available pages before exploring further.

# Файл плагина

Основной файл (скрипт) плагина должен возвращать ссылку на основной класс плагина, например: `MyPlugin::class`

Пример минимального плагина:

```kotlin theme={null}
package kplugin.myplugin

import kotly.plugin.KotlyPlugin

class MyPlugin : KotlyPlugin() {
    override fun onEnable() {
        logger.info("Hello world!")
    }
    
    override fun onDisable() {
        logger.info("Bye!")
    }
}

MyPlugin::class
```

<Warning>
  Главный класс плагина должен наследоваться от `KotlyPlugin`
</Warning>
