mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
Fail silently on incorrect number input
This commit is contained in:
parent
9528f47727
commit
b374b3b2cd
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue