Class CommandFilter
java.lang.Object
com.sk89q.worldguard.util.command.CommandFilter
Checks whether a command is permitted with support for subcommands
split by
\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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder class forCommandFilter
. -
Constructor Summary
ConstructorsConstructorDescriptionCommandFilter
(Collection<String> permitted, Collection<String> denied) Create a new instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.common.base.Predicate
equals, test
-
Constructor Details
-
CommandFilter
Create a new instance.- Parameters:
permitted
- a list of rules for permitted commandsdenied
- a list of rules for denied commands
-
-
Method Details
-
apply
- Specified by:
apply
in interfacecom.google.common.base.Predicate<String>
-