API Getting Started

Introduction

NameGradient contains an API

Setup

Replace VERSION with the plugin version

<dependencies>
        <dependency>
            <groupId>xshyo.us</groupId>
            <artifactId>NameGradient</artifactId>
            <version>1.4.3-STABLE</version>
            <scope>provided</scope>
        </dependency>
</dependencies>

In your plugin.yml file you must add as a dependency

depend: [NameGradient]

Getting an API instance

import xshyo.us.thegradient.NameGradientAPI;
import xshyo.us.therewards.NameGradient;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class Example extends JavaPlugin {

    private NameGradientAPI api;    
        
    @Override
    public void onEnable() {
        if (Bukkit.getPluginManager().isPluginEnabled("NameGradient")) {
            this.api = NameGradient.getInstance().getAPI();
        }

        if (this.api != null) {
    
        }
        
    }
}

API

Last updated