Use this code to get all of the features from GangsX API
APIManager apiManager = GangsX.getAPI();
This will return the APIManager class which contains the following methods:
public class APIManager {
private final GangsX plugin;
public APIManager(GangsX plugin) {
this.plugin = plugin;
}
/**
* Retrieves the Gang object associated with the given player UUID.
*
* @param playerUUID the UUID of the player for whom to retrieve the Gang
* @return the Gang object associated with the player UUID, or null if the player does not have a gang
*/
public Gang getGang(UUID playerUUID) {
GPlayer gPlayer = plugin.getGPlayerDataFactory().getGPlayerData(playerUUID);
if(!gPlayer.hasGang()) {
return null;
}
return plugin.getGangDataFactory().getGangData(gPlayer.getGangId());
}
/**
* Retrieves the GPlayer object associated with the given player UUID.
*
* @param playerUUID the UUID of the player for whom to retrieve the GPlayer
* @return the GPlayer object associated with the player UUID, or null if the player does not exist
*/
public GPlayer getGPlayer(UUID playerUUID) {
return plugin.getGPlayerDataFactory().getGPlayerData(playerUUID);
}
/**
* Retrieves the Tournament object from the plugin.
*
* @return the Tournament object from the plugin
*/
public Tournament getTournament() {
return plugin.getTournament();
}
/**
* Returns the QuestUtils object associated with the plugin.
*
* @return the QuestUtils object
*/
public QuestUtils getQuestUtils() {
return plugin.getQuestUtils();
}
}