Making your own Origins-Reborn addon
To make an Origins-Reborn addon, you first need to know how to make a Paper plugin.
You can find a guide to making Paper plugins here.
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 getAbilities
method, and return a list. This is where you'll return the custom powers your want to be registered.
This is what your main class should look like at this point:
To create custom abilities, you need to make classes that implement Ability classes. For examples of custom abilties you can see the abilities
directory in the Origins-Monsters plugin.
To register your custom abilities, you need to return a new instance of them in the getAbilities
method, like this:
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:
Finally, build your plugin and add it to your server's plugins folder.
Last updated
Was this helpful?