Skip to content
ValentinJDT edited this page Aug 23, 2023 · 11 revisions

Install add-ons

You can initiate plugin and/or command directory with:

PluginLoader.createInstance<Plugin>()
PluginLoader.createInstance<Command>()

It will create two folders when you launch your application:

  • commands
  • plugins

Then, drag and drop your files in commands or plugins as you want.

You can create your own plugins and commands directories but find out by yourself!

Create a plugin

Before starting to make your own add-on, install the EmptyTerminal and install this command in your terminal.

To create a plugin, execute this command: template plugin ./ This command generates an empty project.

Your main class is in "src\main\kotlin\org\example\plugin".
You can rename the package but rename it too in build.gradle.kts.
The main class is defined in resources\plugin.properties.
You can add others properties but don't remove main=<class> otherwise your plugin will not load.

In Plugin class constructor, you can define the name of the plugin with "name" property (already set) and the description (optional).

You can see two functions :

  • override fun onEnable(): it executed when the plugin is loaded.
  • override fun onDisable(): it executed when the plugin is unloaded.

These functions are optional.

It's time to do any things you want !

Create a command

Before starting to make your own add-on, install the EmptyTerminal and install this command in your terminal.

To create a plugin, execute this command: template command ./ This command generates an empty project.

Your main class is in src\main\kotlin\org\example\plugin\command.
You can rename the package but rename it too in build.gradle.kts.
The main class is defined in resources\plugin.properties.
You can add others properties but don't remove main=<class> otherwise your plugin will not load.

In Command class constructor, you can define the name of the command with "name" property (already set) and the description (optional).

You can see three functions :

  • override fun onEnable(): it's executed when the plugin is loaded. (optional)
  • override fun onDisable(): it's executed when the plugin is unloaded. (optional)
  • override fun execute(args: List<String>): it's executed when command is found.

It's time to do any things you want !

Build an add-on

Use gradlew build and gradlew jar. The jar file is created in build\libs.

Clone this wiki locally