From d6f528e808f30e7149244c562e5382d15d39897c Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 6 Aug 2012 03:14:26 -0500 Subject: [PATCH] Fail silently on incorrect number input By: feildmaster --- .../java/org/bukkit/command/defaults/VanillaCommand.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/VanillaCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/VanillaCommand.java index 8a76ebed47..bf6df75039 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/VanillaCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/VanillaCommand.java @@ -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) {