13
0
geforkt von Mirrors/Paper

Fail silently on incorrect number input

By: feildmaster <admin@feildmaster.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2012-08-06 03:14:26 -05:00
Ursprung d63210b3ec
Commit d6f528e808

Datei anzeigen

@ -26,11 +26,11 @@ public abstract class VanillaCommand extends Command {
protected int getInteger(CommandSender sender, String value, int min, int max) { protected int getInteger(CommandSender sender, String value, int min, int max) {
int i = min; int i = min;
try { try {
i = Integer.valueOf(value); i = Integer.valueOf(value);
} catch (NumberFormatException ex) { } catch (NumberFormatException ex) {}
sender.sendMessage("Invalid exp count: " + value);
}
if (i < min) { if (i < min) {
i = min; i = min;
} else if (i > max) { } else if (i > max) {