Package me.playernguyen.opteco.api
Class OptEcoAPI
java.lang.Object
me.playernguyen.opteco.api.OptEcoAPIAbstract
- All Implemented Interfaces:
IOptEcoAPI
public class OptEcoAPI extends java.lang.Object implements IOptEcoAPI
-
Constructor Summary
Constructors Constructor Description OptEcoAPI(java.util.UUID uuid)Get the OptEco API -
Method Summary
Modifier and Type Method Description booleanaddPoints(double amount)Add points into player's accountjava.lang.StringgetCurrencySymbol()Get the currency symboljava.util.UUIDgetPlayer()API Player interactivedoublegetPoints()Get balance/points of playerbooleanhasAccount()Check whether the account that exist or notbooleanisPending()Check whether player is on pending transaction or notbooleansetPoints(double amount)Set the balance of playerbooleantakePoints(double amount)Take points out of player's account
-
Constructor Details
-
OptEcoAPI
public OptEcoAPI(java.util.UUID uuid)Get the OptEco API- Parameters:
uuid- who you want to get?
-
-
Method Details
-
hasAccount
public boolean hasAccount()Check whether the account that exist or not- Specified by:
hasAccountin interfaceIOptEcoAPI- Returns:
- boolean has this account on database or not
-
setPoints
public boolean setPoints(double amount)Set the balance of player- Specified by:
setPointsin interfaceIOptEcoAPI- Parameters:
amount- amount you want to set- Returns:
- boolean is set or not
-
getPoints
public double getPoints()Get balance/points of player- Specified by:
getPointsin interfaceIOptEcoAPI- Returns:
- double balance of that player
-
isPending
public boolean isPending()Check whether player is on pending transaction or not- Specified by:
isPendingin interfaceIOptEcoAPI- Returns:
- boolean is pending or not
-
getPlayer
public java.util.UUID getPlayer()API Player interactive- Specified by:
getPlayerin interfaceIOptEcoAPI- Returns:
- Player
-
addPoints
public boolean addPoints(double amount)Add points into player's account- Specified by:
addPointsin interfaceIOptEcoAPI- Parameters:
amount- how much- Returns:
- is added or not
-
takePoints
public boolean takePoints(double amount)Take points out of player's account- Specified by:
takePointsin interfaceIOptEcoAPI- Parameters:
amount- how much- Returns:
- is taken or not
-
getCurrencySymbol
public java.lang.String getCurrencySymbol()Get the currency symbol- Specified by:
getCurrencySymbolin interfaceIOptEcoAPI- Returns:
- String currency symbol
-