public final class PermissionsSetupEvent extends Object
PermissionSubject's permissions are being setup.
This event is only called once per subject, on initialisation.
| Constructor and Description |
|---|
PermissionsSetupEvent(PermissionSubject subject,
PermissionProvider provider) |
| Modifier and Type | Method and Description |
|---|---|
PermissionFunction |
createFunction(PermissionSubject subject)
Uses the provider function to obtain a
PermissionFunction for the subject. |
PermissionProvider |
getProvider() |
PermissionSubject |
getSubject() |
void |
setProvider(@Nullable PermissionProvider provider)
Sets the
PermissionFunction that should be used for the subject. |
String |
toString() |
public PermissionsSetupEvent(PermissionSubject subject, PermissionProvider provider)
public PermissionSubject getSubject()
public PermissionFunction createFunction(PermissionSubject subject)
PermissionFunction for the subject.subject - the subjectpublic PermissionProvider getProvider()
public void setProvider(@Nullable PermissionProvider provider)
PermissionFunction that should be used for the subject.
Specifying null will reset the provider to the default
instance given when the event was posted.
provider - the provider