> For the complete documentation index, see [llms.txt](https://timsixths-plugins.gitbook.io/minigameapi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://timsixths-plugins.gitbook.io/minigameapi-docs/2.0.0-alpha1/modules/how-to-create-module.md).

# How to create module?

{% hint style="danger" %}
Every module class must implement Module interface
{% endhint %}

```java
public class MyModule implements Module {

    @Override
    public String getName() { //required to implement
        return "your-module-name"; //It is recommended to create name with this pattern
        //your-nickname or something else and the module name 
        //({your-nickname}-{module-name})
    }
    
    @Override
    public void onEnable() { //optional to implement
       //define your on enable logic
    }

    @Override
    public void onDisable() { //optional to implement
       //define your on disable logic       
    }
    
    @Override
    public String[] requiredModules() { //optional to implement
        //define module dependencies, type other modules names,
        // If this dependecies are not registered, the module thrown exception with information
        return new String[]{};
    }
}
```
