API Getting Started
Introduction
TheRewards contains an API for obtaining or modifying player rewards.
Setup
Replace VERSION with the plugin version
<dependencies>
<dependency>
<groupId>xshyo.us</groupId>
<artifactId>TheRewards</artifactId>
<version>1.4.5-STABLE</version>
<scope>provided</scope>
</dependency>
</dependencies>In your plugin.yml file you must add as a dependency
depend: [TheRewards]Getting an API instance
import xshyo.com.therewards.TheRewardsAPI;
import xshyo.com.therewards.TheRewards;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public class Example extends JavaPlugin {
private TheRewardsAPI api;
@Override
public void onEnable() {
if (Bukkit.getPluginManager().isPluginEnabled("TheRewards")) {
this.api = TheRewards.getInstance().getAPI();
}
if (this.api != null) {
}
}
}API
The Settings option is not yet functional.
Last updated