Skip to main content

JavaPlugin

You may be wondering, "Where is the JavaPlugin?"

Well, the JavaPlugin is a class that is used to create a plugin for the Minecraft server. It is a part of the Bukkit API. But since Fairy has it own Plugin instance, so you won't be able to use the JavaPlugin class directly.

Then where is it then? It is located in BukkitPlugin class, which is located in the Bukkit Bootstrap. To access the JavaPlugin instance, you can use the following code:

import io.fairyproject.bootstrap.bukkit.BukkitPlugin;

public class Test {
@Override
public void onEnable() {
JavaPlugin javaPlugin = BukkitPlugin.INSTANCE;

// Do something with the JavaPlugin instance!
}
}

That's easy, right?