VisibleAbility

How to create abilities that show up in the selection GUI

Note: This page only contains information relevant to the VisibleAbility interface.

For information on giving your ability a key and running code for players who have the ability, see the Ability interface.

When creating a VisibleAbility, you need to implement the description and title methods with your ability's description and title.

Note: These set the default description and title for your ability.

These will be saved to the ~/plugins/Origins-Reborn/translations.yml file, allowing people who use your addon to easily customise the description and title.

Because of this, updating the description and title in your class will not update the ability title and description if you have already loaded the server with the old versions.

You can fix this by changing them in the translations.yml file, or by deleting the file to make the plugin regenerate it.

Example:

public class ExampleCustomAbility implements VisibleAbility {
    @Override
    public @NotNull Key getKey() {
        return Key.key("my_cool_addon", "my_ability");
    }

    @Override
    public String description() {
        return "My Description";
    }

    @Override
    public String title() {
        return "My Title";
    }
}

Last updated

Was this helpful?