Remove useless integer limit check (#344)

This commit is contained in:
Luna 2023-06-03 17:00:02 -03:00 committed by GitHub
parent f303dbfc73
commit 7fabfdae1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 18 deletions

View File

@ -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":