Update Ability.java
This commit is contained in:
parent
203b26587f
commit
1855a27d13
@ -50,9 +50,8 @@ public final class Ability {
|
|||||||
|
|
||||||
@SafeVarargs
|
@SafeVarargs
|
||||||
private Ability(String name, String info, Locality locality, Privacy privacy, int argNum, boolean statsEnabled, Consumer<MessageContext> action, Consumer<MessageContext> postAction, List<Reply> replies, Predicate<Update>... flags) {
|
private Ability(String name, String info, Locality locality, Privacy privacy, int argNum, boolean statsEnabled, Consumer<MessageContext> action, Consumer<MessageContext> postAction, List<Reply> replies, Predicate<Update>... flags) {
|
||||||
checkArgument(!isEmpty(name), "Method name cannot be empty");
|
checkArgument(isValidCommandName(name), "Method name can only contain alpha-numeric characters and underscores," +
|
||||||
checkArgument(!containsWhitespace(name), "Method name cannot contain spaces");
|
" cannot be longer than 31 characters, empty or null", name);
|
||||||
checkArgument(isAlphanumeric(name), "Method name can only be alpha-numeric", name);
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.info = info;
|
this.info = info;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user