Package net.kyori.adventure.permission
Interface PermissionChecker
-
- All Superinterfaces:
java.util.function.Predicate<java.lang.String>
public interface PermissionChecker extends java.util.function.Predicate<java.lang.String>
Something that has permissions.- Since:
- 4.8.0
-
-
Field Summary
Fields Modifier and Type Field Description static Pointer<PermissionChecker>
POINTER
A pointer to a permission predicate.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static @NotNull PermissionChecker
always(TriState state)
Creates aPermissionChecker
that always returnsstate
.default boolean
test(java.lang.String permission)
@NotNull TriState
value(java.lang.String permission)
Checks if something has a permission.
-
-
-
Field Detail
-
POINTER
static final Pointer<PermissionChecker> POINTER
A pointer to a permission predicate.- Since:
- 4.8.0
-
-
Method Detail
-
always
@NotNull static @NotNull PermissionChecker always(TriState state)
Creates aPermissionChecker
that always returnsstate
.- Parameters:
state
- the state- Returns:
- a
PermissionChecker
- Since:
- 4.8.0
-
value
@NotNull @NotNull TriState value(java.lang.String permission)
Checks if something has a permission.- Parameters:
permission
- the permission- Returns:
- a tri-state result
- Since:
- 4.8.0
-
test
default boolean test(java.lang.String permission)
- Specified by:
test
in interfacejava.util.function.Predicate<java.lang.String>
-
-