Package net.kyori.adventure.permission
Interface PermissionChecker
-
-
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(String permission)
@NotNull TriState
value(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(String permission)
Checks if something has a permission.- Parameters:
permission
- the permission- Returns:
- a tri-state result
- Since:
- 4.8.0
-
-