Skip to content

Commit

Permalink
Avoid using NumberUtils. Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Apr 15, 2023
1 parent 68f696a commit eeafa23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
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;
Expand Down Expand Up @@ -118,11 +117,12 @@ private boolean badSyntaxCheck(PermissionAttachmentInfo perms, String name, Stri
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;
}

Expand Down

0 comments on commit eeafa23

Please sign in to comment.