Package com.plotsquared.core.permissions
Interface PermissionHandler
public interface PermissionHandler
Permission handler
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumPermission 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 booleanCheck whether the permission handler has a given capabilityvoidInitialize 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
@NonNull Set<PermissionHandler.PermissionHandlerCapability> 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:
trueif the handler has the capability, elsefalse
-