forked from Upstream/mmocore
Fixed an error when setting exp to 0
This commit is contained in:
parent
9a08c142fb
commit
0ae7c3613d
@ -58,8 +58,8 @@ public class ExperienceCommandTreeNode extends CommandTreeNode {
|
|||||||
int amount;
|
int amount;
|
||||||
try {
|
try {
|
||||||
amount = Integer.parseInt(args[5]);
|
amount = Integer.parseInt(args[5]);
|
||||||
Validate.isTrue(amount > 0);
|
Validate.isTrue(amount >= 0);
|
||||||
} catch (NumberFormatException exception) {
|
} catch (RuntimeException exception) {
|
||||||
sender.sendMessage(ChatColor.RED + args[5] + " is not a valid number.");
|
sender.sendMessage(ChatColor.RED + args[5] + " is not a valid number.");
|
||||||
return CommandResult.FAILURE;
|
return CommandResult.FAILURE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user