public class CommandFilter
extends java.lang.Object
implements com.google.common.base.Predicate<java.lang.String>
\s (regular expressions).
permitted always overrides denied (unlike other parts of
WorldGuard). Either can be null. If both are null, then every command is
permitted. If only permitted is null, then all commands but
those in the list of denied are permitted. If only denied is null,
then only commands in the list of permitted are permitted. If neither are
null, only permitted commands are permitted and the list of denied commands
is not used.
The test is case in-sensitive.
| Modifier and Type | Class and Description |
|---|---|
static class |
CommandFilter.Builder
Builder class for
CommandFilter. |
| Constructor and Description |
|---|
CommandFilter(java.util.Collection<java.lang.String> permitted,
java.util.Collection<java.lang.String> denied)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(java.lang.String command) |
public CommandFilter(@Nullable
java.util.Collection<java.lang.String> permitted,
@Nullable
java.util.Collection<java.lang.String> denied)
permitted - a list of rules for permitted commandsdenied - a list of rules for denied commands