-
Notifications
You must be signed in to change notification settings - Fork 1
API
Aidan McLeod edited this page Mar 6, 2023
·
4 revisions
XpBank now comes with an attached API class for making accessing values from outside the plugin easier for developers!
Here is a list of the methods available through the XpBankAPI.java class
/**
* Gets the raw number of experience points a user has in the XpBank
* @param p Player's balance to retrieve
* @return Player p's balance
*/
public static int getBalance(OfflinePlayer p)/**
* Gets the number of experience points a user has in the XpBank as a number of experience levels
* @param p Player's balance to retrieve
* @return Player p's balance in levels
*/
public static int getBalanceLevels(OfflinePlayer p)/**
* Sets the XpBank balance of a player
* @param p Player's balance to set
* @param amount Amount to set the balance to
* @return Success status of balance modification
*/
public static boolean setBalance(OfflinePlayer p, int amount)/**
* Sets the XpBank balance of a player to a given number of levels
* @param p Player's balance to set
* @param amount Amount of levels to set the balance to
* @return Success status of balance modification
*/
public static boolean setBalanceLevels(OfflinePlayer p, int amount)