public final class LiteCommandsUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkAliases(java.util.Collection<java.lang.String> aliases) |
static boolean |
checkAliases(java.lang.String[] aliases)
Checks if aliases are consistent
|
static boolean |
checkConsistent(java.lang.String name,
java.lang.String[] aliases)
Checks if name and aliases are consistent with LiteCommands rules.
|
static boolean |
checkName(java.lang.String name)
Checks if name is consistent
|
public static boolean checkConsistent(java.lang.String name,
java.lang.String[] aliases)
Name cannot be null or empty, cannot start or end with space, cannot contain two spaces in a row Aliases cannot be null, cannot contain null, cannot contain empty, cannot contain two spaces in a row, cannot start or end with space, cannot contain different count of words than name If name and aliases are consistent, returns true
Example:
name - command name cannot be null or empty, cannot start or end with space, cannot contain two spaces in a rowaliases - aliases name cannot be null, cannot contain null, cannot contain empty, cannot contain two spaces in a row, cannot start or end with space, cannot contain different count of words than namejava.lang.IllegalArgumentException - if name or aliases are not consistent, if name or aliases contain two spaces in a row, if name or aliases start or end with spacejava.lang.NullPointerException - if name or aliases are nullcheckName(String),
checkAliases(String[])public static boolean checkName(java.lang.String name)
Name cannot be null or empty, cannot start or end with space, cannot contain two spaces in a row
Example:
name - cannot be null or empty, cannot start or end with space, cannot contain two spaces in a rowjava.lang.IllegalArgumentException - if name contains two spaces in a row, if name start or end with spacejava.lang.NullPointerException - if name is nullcheckConsistent(String, String[]),
checkAliases(String[])public static boolean checkAliases(java.lang.String[] aliases)
Aliases cannot be null, cannot contain null, cannot contain empty, cannot contain two spaces in a row, cannot start or end with space
Example:
aliases - cannot be null, cannot contain null, cannot contain empty, cannot contain two spaces in a row, cannot start or end with spacejava.lang.IllegalArgumentException - if aliases contain two spaces in a row, if aliases start or end with spacejava.lang.NullPointerException - if aliases are nullcheckConsistent(String, String[]),
checkName(String)public static boolean checkAliases(java.util.Collection<java.lang.String> aliases)