Fail silently on incorrect number input
This commit is contained in:
parent
9528f47727
commit
b374b3b2cd
@ -26,11 +26,11 @@ public abstract class VanillaCommand extends Command {
|
||||
|
||||
protected int getInteger(CommandSender sender, String value, int min, int max) {
|
||||
int i = min;
|
||||
|
||||
try {
|
||||
i = Integer.valueOf(value);
|
||||
} catch (NumberFormatException ex) {
|
||||
sender.sendMessage("Invalid exp count: " + value);
|
||||
}
|
||||
} catch (NumberFormatException ex) {}
|
||||
|
||||
if (i < min) {
|
||||
i = min;
|
||||
} else if (i > max) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user