mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fixed issue where adding XP via command without specifying a player
didn't trigger level-ups.
This commit is contained in:
parent
ef3802f7c2
commit
26ed6aa840
@ -73,7 +73,9 @@ public class AddxpCommand implements CommandExecutor {
|
|||||||
} else if (args.length == 2 && m.isInt(args[1]) && Skills.isSkill(args[0])) {
|
} else if (args.length == 2 && m.isInt(args[1]) && Skills.isSkill(args[0])) {
|
||||||
int newvalue = Integer.valueOf(args[1]);
|
int newvalue = Integer.valueOf(args[1]);
|
||||||
Users.getProfile(player).addXP(Skills.getSkillType(args[0]), newvalue, player);
|
Users.getProfile(player).addXP(Skills.getSkillType(args[0]), newvalue, player);
|
||||||
player.sendMessage(ChatColor.RED + args[0] + " has been modified.");
|
player.sendMessage(ChatColor.GREEN + "Experience granted!"); //TODO: Needs more locale.
|
||||||
|
player.sendMessage(ChatColor.RED + args[0] + " has been modified."); //TODO: Needs more locale.
|
||||||
|
Skills.XpCheckAll(plugin.getServer().getPlayer(args[0]));
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(ChatColor.RED + "Usage is /addxp playername skillname xp"); //TODO: Needs more locale.
|
player.sendMessage(ChatColor.RED + "Usage is /addxp playername skillname xp"); //TODO: Needs more locale.
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user