Class PermissionsSetupEvent
- java.lang.Object
-
- com.velocitypowered.api.event.permission.PermissionsSetupEvent
-
public final class PermissionsSetupEvent extends Object
Called when aPermissionSubject's permissions are being setup.This event is only called once per subject, on initialisation.
-
-
Constructor Summary
Constructors Constructor Description PermissionsSetupEvent(PermissionSubject subject, PermissionProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PermissionFunctioncreateFunction(PermissionSubject subject)Uses the provider function to obtain aPermissionFunctionfor the subject.PermissionProvidergetProvider()PermissionSubjectgetSubject()voidsetProvider(@Nullable PermissionProvider provider)Sets thePermissionFunctionthat should be used for the subject.StringtoString()
-
-
-
Constructor Detail
-
PermissionsSetupEvent
public PermissionsSetupEvent(PermissionSubject subject, PermissionProvider provider)
-
-
Method Detail
-
getSubject
public PermissionSubject getSubject()
-
createFunction
public PermissionFunction createFunction(PermissionSubject subject)
Uses the provider function to obtain aPermissionFunctionfor the subject.- Parameters:
subject- the subject- Returns:
- the obtained permission function
-
getProvider
public PermissionProvider getProvider()
-
setProvider
public void setProvider(@Nullable PermissionProvider provider)
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
-
-