Interface PermissionSubject
- All Known Subinterfaces:
CommandSource,ConsoleCommandSource,Player
public interface PermissionSubject
Represents an object that has a set of queryable permissions.
-
Method Summary
Modifier and TypeMethodDescriptiondefault PermissionCheckerGets the permission checker for the subject.Gets the subjects permission map.@NonNull TristategetPermissionValue(String permission) Gets the subjects setting for a particular permission.default booleanhasPermission(String permission) Determines whether the subject has a particular permission.
-
Method Details
-
hasPermission
Determines whether the subject has a particular permission.- Parameters:
permission- the permission to check for- Returns:
- whether the subject has the permission
-
getPermissionValue
Gets the subjects setting for a particular permission. Used as a delegate forPermissionFunction.getPermissionValue(String)- Parameters:
permission- the permission- Returns:
- the value the permission is set to
-
getPermissionMap
Gets the subjects permission map. Should return null when the permission map is unavailable. Used as a delegate forPermissionResolver.getPermissionMap()- Returns:
- the permission map or
null if unavailable
-
getPermissionChecker
Gets the permission checker for the subject.- Returns:
- subject's permission checker
-