Package com.plotsquared.core.permissions
Interface PermissionHandler
public interface PermissionHandler
Permission handler
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Permission handler capabilities -
Method Summary
Modifier and TypeMethodDescriptionGet all capabilities that the permission handler hasgetPermissionProfile
(@NonNull OfflinePlotPlayer offlinePlotPlayer) Attempt to construct a permission profile for an offline plot playergetPermissionProfile
(@NonNull PlotPlayer<?> playerPlotPlayer) Attempt to construct a permission profile for a plot playerdefault boolean
Check whether the permission handler has a given capabilityvoid
Initialize the permission handler
-
Method Details
-
initialize
void initialize()Initialize the permission handler -
getPermissionProfile
Attempt to construct a permission profile for a plot player- Parameters:
playerPlotPlayer
- Plot player- Returns:
- Permission profile, if one was able to be constructed
-
getPermissionProfile
@NonNull Optional<PermissionProfile> getPermissionProfile(@NonNull OfflinePlotPlayer offlinePlotPlayer) Attempt to construct a permission profile for an offline plot player- Parameters:
offlinePlotPlayer
- Offline player- Returns:
- Permission profile, if one was able to be constructed
-
getCapabilities
Get all capabilities that the permission handler has- Returns:
- Immutable set of capabilities
-
hasCapability
Check whether the permission handler has a given capability- Parameters:
capability
- Capability- Returns:
true
if the handler has the capability, elsefalse
-