Skip to content


BentoBox relies on Addons to provide new features or new Gamemodes. This tutorial will guide you through the process of creating your first addon.

Creating an Addon is often easier and quicker than creating a plugin from scratch, because BentoBox provides wrappers and key API features. Addons also have direct access to the other addons' API, unlike plugins, due to the visibility principle of Java Classloaders. Moreover, they have access to BentoBox's Config API and Database API.

In order to comfortably follow this tutorial, you should have previous experience in plugin development. The addon development process is indeed very similar to the latter, and we will consider throughout this tutorial that you understand the key Java concepts, for the sake of concision.

Prepare the project#

Using the pre-made Addon template#

The template currently does not exist.

Manually creating the project#

Import BentoBox as a dependency#

BentoBox holds all the API you will need to create and register your addon. Therefore, you should add it as a dependency of your project.

BentoBox uses Maven and our Maven repository is kindly provided by CodeMC. However, you can also use Gradle to grab BentoBox.


Add the following to your pom.xml file.




Add the following to your build.gradle file.

repositories {
  maven { url "" }

dependencies {
  compileOnly 'world.bentobox:bentobox:PUT-VERSION-HERE'

If you have any issues, please have a look at Gradle's documentation about declaring dependencies.

Setup the project architecture#

Create the main Addon class#

The main class of an Addon works similarly as to one of a plugin. It most notably handles the code that runs when laoding, enabling, reloading and disabling the addon.

The main class extends Addon.


import world.bentobox.bentobox.api.addons.Addon;

public class MyAddon extends Addon {



When naming your main class, consider the following: We recommend you to keep its name as close to the addon's name as possible. You can also append "Addon" to the class name to further disambiguate its purpose.

Genuine examples: Greenhouses, Chat, Biomes.

Mandatory methods#

Like Bukkit plugins, Addons must override a few methods in order to be properly enabled.

As such, your main Addon class should look like the following:

import world.bentobox.bentobox.api.addons.Addon;

public class MyAddon extends Addon {
    public void onEnable() {}

    public void onDisable() {}


This method is called after #onLoad().


Optional methods#

Additional methods can be overridden if needs be.

import world.bentobox.bentobox.api.addons.Addon;

public class MyAddon extends Addon {
    public void onLoad() {}

    public void onEnable() {}

    public void onReload() {}

    public void onDisable() {}



Create the addon.yml#

Last update: September 6, 2021 19:01:48