XPBoost API

Nov 25, 2019
XPBoost API
  • XPBoost API

    Example:
    Code (Text):
    public void customFunction(Player player){
        UUID id = player.getUniqueId();
        if(xpbAPI.hasBoost(id)){
            XPBoost xpb = xpbAPI.getBoost(id);
             
            System.out.println("Player boost: " + xpb.getBoost());
            System.out.println("Player boost duration: " + xpb.getBoostTime());
            System.out.println("Time remaining: (in seconds) " + xpb.getTimeRemaining());
            System.out.println("Boost end time (in miliseconds): " + xpb.getEndTime());
            System.out.println("List of conditions: " + xpb.getConditions());

            ///xpb.clear(); //Clears/Removes Boost
             
        }

    }

    Other:
    Code (Text):
    xpbAPI.hasBoost(UUID id) /Returns Boolean
    xpbAPI.setPlayerBoost(UUId id, double boost, int time) /Set XP Boost for a player
    xpbAPI.getPlayerBoost(UUID id) /Returns players current XP boost
    xpbAPI.clearBoost(UUID id) /Clears Boost from a player
    xpbAPI.getTimeRemaining(UUID id) /Returns time remaining in seconds (if boost is not active then 0)
  • Loading...
  • Loading...