Examples of changeExp()


Examples of com.github.zathrus_writer.commandsex.helpers.ExperienceManager.changeExp()

      // Otherwise add the XP normally
      if (overLimit){
        expman.setExp(xpMax);
        LogHelper.showInfo("xpCouldNotAddAll", sender, ChatColor.RED);
      } else {
        expman.changeExp(amountint);
      }
      // Send a success message to the target with the actual amount of XP that was added
      if (sender != target) { LogHelper.showInfo("xpAdded#####[" + (overLimit ? xpMax - oldXP : amountint) + " #####xpExperience#####[ #####xpTo#####[" + Nicknames.getNick(target.getName()), sender, ChatColor.AQUA); }
      // Send a success message to the sender with the actual amount of XP that was added
      LogHelper.showInfo((sender != target ? "[" + Nicknames.getNick(sender.getName()) + " #####xpAddedGave1#####[" : "xpAddedGave2#####[") + (overLimit ? xpMax - oldXP : amountint) + " #####xpExperience", target, ChatColor.AQUA);
View Full Code Here

Examples of com.github.zathrus_writer.commandsex.helpers.ExperienceManager.changeExp()

      // Check if the player has the amount needed
      boolean hasXP = expman.hasExp(amountint);
      int oldXP = expman.getCurrentExp();
      // If the player has the XP, then take the amount the user defined
      // If not then take as much as we can
      expman.changeExp(-(hasXP ? amountint : expman.getCurrentExp()));
      // Send a message to sender saying the target didn't have that amount
      if (!hasXP) { LogHelper.showInfo("xpNotEnough", sender, ChatColor.RED); }
      // Alert the target that some of his XP has been stolen and the actual amount of XP taken
      if (sender != target) { LogHelper.showInfo("xpTaken#####[" + (hasXP ? amountint : oldXP) + " #####xpExperience#####[ #####xpFrom#####[" + Nicknames.getNick(target.getName()), sender, ChatColor.AQUA); }
      // Send a message to the sender with the actual amount of XP taken
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.