Fail silently on incorrect number input

By: feildmaster <admin@feildmaster.com>
This commit is contained in:
Bukkit/Spigot 2012-08-06 03:14:26 -05:00
parent d63210b3ec
commit d6f528e808

View File

@ -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) {