Class PermissionsSetupEvent
java.lang.Object
com.velocitypowered.api.event.permission.PermissionsSetupEvent
Called when a
PermissionSubject's permissions are being setup.
This event is only called once per subject, on initialisation.
-
Constructor Summary
ConstructorsConstructorDescriptionPermissionsSetupEvent(PermissionSubject subject, PermissionProvider provider) -
Method Summary
Modifier and TypeMethodDescriptioncreateFunction(PermissionSubject subject) Uses the provider function to obtain aPermissionFunctionfor the subject.voidsetProvider(@Nullable PermissionProvider provider) Sets thePermissionFunctionthat should be used for the subject.toString()
-
Constructor Details
-
PermissionsSetupEvent
-
-
Method Details
-
getSubject
-
createFunction
Uses the provider function to obtain aPermissionFunctionfor the subject.- Parameters:
subject- the subject- Returns:
- the obtained permission function
-
getProvider
-
setProvider
Sets thePermissionFunctionthat should be used for the subject.Specifying
nullwill reset the provider to the default instance given when the event was posted.- Parameters:
provider- the provider
-
toString
-