forked from Fascinated/Bat
add user lookup command
This commit is contained in:
21
src/main/java/cc/fascinated/bat/common/LongUtils.java
Normal file
21
src/main/java/cc/fascinated/bat/common/LongUtils.java
Normal file
@ -0,0 +1,21 @@
|
||||
package cc.fascinated.bat.common;
|
||||
|
||||
/**
|
||||
* @author Fascinated (fascinated7)
|
||||
*/
|
||||
public class LongUtils {
|
||||
/**
|
||||
* Checks if a string is a long
|
||||
*
|
||||
* @param string the string to check
|
||||
* @return if the string is a long
|
||||
*/
|
||||
public static boolean isLong(String string) {
|
||||
try {
|
||||
Long.parseLong(string);
|
||||
return true;
|
||||
} catch (NumberFormatException exception) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user