Origins-Reborn
  • Contents
  • FAQ
  • Addons
  • Custom origins
    • Origin Powers
    • Layers
  • Placeholders
  • Troubleshooting
  • Configuration
  • Skript
  • Making your own Origins-Reborn addon
    • Creating the addon
    • Custom abilities
    • Ability
    • VisibleAbility
Powered by GitBook
On this page

Was this helpful?

  1. Making your own Origins-Reborn addon

Creating the addon

Once you have a basic Paper plugin set up, you can begin to make an Origins-Reborn addon.

First, you need to make your main class extend OriginsAddon, rather than JavaPlugin. This is so that your plugin is detected as an Origins-Reborn addon, rather than just being considered a normal plugin.

You will need to implement the getNamespace method in your addon, where you have to return a String representing your addon. Set this to any short string of text representing your plugin.

If you have an onEnable method in your plugin's main class, you may notice that it is now showing an error.

This is because Origins-Reborn addons override the onEnable method by default to perform tasks related to registering the plugin as an addon.

You can easily fix this by renaming your onEnable method to onRegister, which is called at the start of onEnable in Origins-Reborn addons.

To add custom powers, you need to override the getRegisteredAbilities method and return a list. This is where you'll return the custom powers your want to register.

This is what your main class should look like at this point:

public class Main extends OriginsAddon {

    @Override
    public @NotNull String getNamespace() {
        return "my_cool_addon";
    }

    @Override
    public @NotNull List<Ability> getRegisteredAbilities() {
        return List.of(
        );
    }
}

In order to ensure your plugin is loaded after Origins-Reborn, add it to your plugin's dependencies. For a plugin.yml, this is how to set a plugin as a dependancy:

depend:
  - Origins-Reborn

PreviousMaking your own Origins-Reborn addonNextCustom abilities

Last updated 18 days ago

Was this helpful?

To start actually creating abilities, move on to .

Custom abilities