Your First Plugin

In this page you will learn ways of creating your first plugin

Plugins are a lightweight way of integrating features to Tachyon, plugins can use the API to modify quite literally any aspect of the server.

  1. Start by creating a new Java/Kotlin project, you can use any build system you want, we will use Gradle Groovy for this example.

  2. Inside your build systems internal files, define our repository and depend on the Tachyon API. compileOnly "net.tachyon:api:VERSION"

There are two ways of appending metadata to your plugin jar so the plugin can be discovered by Tachyon on startup, manual and automatic. We strongly suggest using the automatic method.

In the resources directory for your project, define a plugin.json file. These work similarly to how you would define a plugin.yml file in a Bukkit plugin, or an extension.json in a Minestom extension. In your plugin.json file, create a couple entries, these act like metadata for your plugin allowing Tachyon to read and discover your plugin before loading it and its dependencies.

{
"name": "ExamplePluginName,
"description": "My first plugin for Tachyon!"
"authors": [
  "Me",
  "Myself",
  "I"
],
"version": "1.0.0",
"main": "my.plugins.main.class"
}

Last updated