geforkt von Mirrors/Paper
Fail silently on incorrect number input
By: feildmaster <admin@feildmaster.com>
Dieser Commit ist enthalten in:
Ursprung
d63210b3ec
Commit
d6f528e808
@ -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) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren