forked from kaboomserver/extras
Remove useless integer limit check (#344)
This commit is contained in:
parent
f303dbfc73
commit
7fabfdae1a
1 changed files with 0 additions and 18 deletions
|
@ -71,24 +71,6 @@ public final class ServerCommand implements Listener {
|
|||
commandName = "/" + arr[1].toLowerCase();
|
||||
}
|
||||
|
||||
for (int i = 1; i < arr.length; i++) {
|
||||
if (arr[i].matches("^[+-]?(?:\\d+\\.?\\d*|\\d*\\.?\\d+)[\\r\\n]*$")) {
|
||||
try {
|
||||
int integer = Integer.parseInt(arr[i]);
|
||||
try {
|
||||
if (integer >= Integer.MAX_VALUE) {
|
||||
return "cancel";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return "cancel";
|
||||
}
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
// Ignore exception
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
switch (commandName) {
|
||||
case "/minecraft:execute":
|
||||
|
|
Loading…
Reference in a new issue