Interface PermissionLevelResult
- All Superinterfaces:
PermissionResult
A
PermissionResult that also contains the permission level that was required for the permission check to pass.-
Method Summary
Modifier and TypeMethodDescriptionbooleanallowed()static @NonNull PermissionLevelResultof(boolean result, @NonNull Permission permission, @NonNull net.minecraft.server.permissions.PermissionLevel requiredPermissionLevel) Creates a new PermissionLevelResult.@NonNull net.minecraft.server.permissions.PermissionLevelReturns the minecraft permission level that was required for the permission lookup to return true.Methods inherited from interface PermissionResult
denied
-
Method Details
-
of
static @NonNull PermissionLevelResult of(boolean result, @NonNull Permission permission, @NonNull net.minecraft.server.permissions.PermissionLevel requiredPermissionLevel) Creates a new PermissionLevelResult.- Parameters:
result-trueif the command may be executed,falseotherwisepermission- permission that this result came fromrequiredPermissionLevel- minecraft permission level that was required for the permission check to pass- Returns:
- the created result
-
allowed
boolean allowed()- Specified by:
allowedin interfacePermissionResult
-
permission
@NonNull Permission permission()- Specified by:
permissionin interfacePermissionResult
-
requiredPermissionLevel
@NonNull net.minecraft.server.permissions.PermissionLevel requiredPermissionLevel()Returns the minecraft permission level that was required for the permission lookup to return true.- Returns:
- the required permission level
-