AdvancedAbilities API

Dec 29, 2017
AdvancedAbilities API
    • How to create an ability
    1. Download the jar and add it in your library.
    2. Create a class and extend it to AbilityCreator, then add the super constructor.
    3. Implement this interface (AbilityCreatorLoader) in your JavaPlugin class and add the interface method.
    4. Instance your ability in getAbility() method of AbilityCreatorLoader interface.
    5. Build the file and add it in your '/plugins/AdvancedAbilities/abilities/api/' folder.
    Code (Text):
    public final class Main extends JavaPlugin implements AbilityCreatorLoader {

        @Override
        public AbilityCreator getAbility() {
            return new YourAbility();
        }

    }
    1. In your ability class you can use the super class methods.
    Code (Text):
    getConfiguration() -> setLogo(ItemStack) : setDescription(List<String>) : setName(String)
    Code (Text):
    getLevelConfiguration(int) -> setDescription(List<String>) : setPrice(double) : setXp(double) : setPriceType(String)
    Code (Text):
    getUtils() -> abilityIsDisabled(UUID) : playerHasLevel(UUID, int) : sendAbilityMessage(UUID)
    Code (Text):
    getId() returns (String) id
    Code (Text):
    getMaxLevel() returns (int) max_level;


    • How to hook an economy system
    1. Download the jar and add it in your library.
    2. Create a class and implement this interface (EconomyHook).
    3. Implement the EconomyHook methods (playerMoney & withdrawMoney).
    4. Instance your economy class in your onEnable method (JavaPlugin).
    5. Add the file in your plugins folder.



  • Loading...
  • Loading...