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 boolean
addPoints(double amount)
Add points into player's accountjava.lang.String
getCurrencySymbol()
Get the currency symboljava.util.UUID
getPlayer()
API Player interactivedouble
getPoints()
Get balance/points of playerboolean
hasAccount()
Check whether the account that exist or notboolean
isPending()
Check whether player is on pending transaction or notboolean
setPoints(double amount)
Set the balance of playerboolean
takePoints(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:
hasAccount
in interfaceIOptEcoAPI
- Returns:
- boolean has this account on database or not
-
setPoints
public boolean setPoints(double amount)Set the balance of player- Specified by:
setPoints
in 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:
getPoints
in interfaceIOptEcoAPI
- Returns:
- double balance of that player
-
isPending
public boolean isPending()Check whether player is on pending transaction or not- Specified by:
isPending
in interfaceIOptEcoAPI
- Returns:
- boolean is pending or not
-
getPlayer
public java.util.UUID getPlayer()API Player interactive- Specified by:
getPlayer
in interfaceIOptEcoAPI
- Returns:
- Player
-
addPoints
public boolean addPoints(double amount)Add points into player's account- Specified by:
addPoints
in 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:
takePoints
in interfaceIOptEcoAPI
- Parameters:
amount
- how much- Returns:
- is taken or not
-
getCurrencySymbol
public java.lang.String getCurrencySymbol()Get the currency symbol- Specified by:
getCurrencySymbol
in interfaceIOptEcoAPI
- Returns:
- String currency symbol
-