XPBoost API

Jan 6, 2019
XPBoost API
  • XPBoost API

    Create experience boosters easily





    Example:
    Code (Text):

    //sets a new boost for a player
    public void setBoost(UUID id, double boost, int duration){
            XPBoost xpb = XPBoostAPI.setPlayerBoost(id, boost, duration);
    }


    public void customFunction(Player player){
        UUID id = player.getUniqueId();
        if(XPBoostAPI.hasBoost(id)){
            XPBoost xpb = XPBoostAPI.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.putCondition(Condition.MCMMO, false); // will disable an effect of this boost for mcmmo
            ///xpb.clear(); //Clears/Removes Boost
        }

    }
     
  • Loading...
  • Loading...