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 account
    java.lang.String getCurrencySymbol()
    Get the currency symbol
    java.util.UUID getPlayer()
    API Player interactive
    double getPoints()
    Get balance/points of player
    boolean hasAccount()
    Check whether the account that exist or not
    boolean isPending()
    Check whether player is on pending transaction or not
    boolean setPoints​(double amount)
    Set the balance of player
    boolean takePoints​(double amount)
    Take points out of player's account

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface IOptEcoAPI
      Returns:
      boolean has this account on database or not
    • setPoints

      public boolean setPoints​(double amount)
      Set the balance of player
      Specified by:
      setPoints in interface IOptEcoAPI
      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 interface IOptEcoAPI
      Returns:
      double balance of that player
    • isPending

      public boolean isPending()
      Check whether player is on pending transaction or not
      Specified by:
      isPending in interface IOptEcoAPI
      Returns:
      boolean is pending or not
    • getPlayer

      public java.util.UUID getPlayer()
      API Player interactive
      Specified by:
      getPlayer in interface IOptEcoAPI
      Returns:
      Player
    • addPoints

      public boolean addPoints​(double amount)
      Add points into player's account
      Specified by:
      addPoints in interface IOptEcoAPI
      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 interface IOptEcoAPI
      Parameters:
      amount - how much
      Returns:
      is taken or not
    • getCurrencySymbol

      public java.lang.String getCurrencySymbol()
      Get the currency symbol
      Specified by:
      getCurrencySymbol in interface IOptEcoAPI
      Returns:
      String currency symbol