Avoid using NumberUtils. Update dependencies.

This commit is contained in:
tastybento 2023-04-15 11:44:56 -07:00
parent 68f696a46c
commit eeafa239c4
2 changed files with 6 additions and 6 deletions

View File

@ -57,8 +57,8 @@
<!-- Non-minecraft related dependencies -->
<powermock.version>2.0.9</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.16.5-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.18.0-SNAPSHOT</bentobox.version>
<spigot.version>1.19.4-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.23.0-SNAPSHOT</bentobox.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- Do not change unless you want different name for local builds. -->

View File

@ -5,7 +5,6 @@ import java.util.Locale;
import java.util.Objects;
import java.util.UUID;
import org.apache.commons.lang.math.NumberUtils;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
@ -118,11 +117,12 @@ public class JoinListener implements Listener {
return true;
}
// Check value
if (!NumberUtils.isDigits(split[4])) {
logError(name, perms.getPermission(), "the last part MUST be a number!");
try {
Integer.parseInt(split[4]);
} catch(Exception e) {
logError(name, perms.getPermission(), "the last part MUST be an integer!");
return true;
}
return false;
}