# 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[]{};
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://timsixths-plugins.gitbook.io/minigameapi-docs/2.0.0-alpha1/modules/how-to-create-module.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
