# Add custom methods

`MyPluinAddon` (In this example) is a class that has all the methods we want to implement

{% hint style="warning" %}
All methods you want to be avaiable from that class need to be **public**
{% endhint %}

<pre class="language-javascript"><code class="lang-javascript"><strong>try { // Basically the same as the helper class from before.
</strong>    addonProvider.addAddon(new PluginAddon("YourPluginName") // Plugin name most be written correctly, you can check it using /plugins in your server.
            .addon(new Addon&#x3C;>("itemsCoreCategoryName",
                    (Player player) ->
                            new MyPluginAddon() // Return your new class with all the methods here.
                    )
            )
            );
} catch (Exception ignore) {
}
</code></pre>
