// 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