Class PermissionsSetupEventImpl
- java.lang.Object
-
- com.velocitypowered.api.event.permission.PermissionsSetupEventImpl
-
- All Implemented Interfaces:
Event,PermissionsSetupEvent
public final class PermissionsSetupEventImpl extends Object implements PermissionsSetupEvent
Called when aPermissionSubject's permissions are being setup.This event is only called once per subject, on initialisation.
-
-
Constructor Summary
Constructors Constructor Description PermissionsSetupEventImpl(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.PermissionProviderprovider()voidsetProvider(@Nullable PermissionProvider provider)Sets thePermissionFunctionthat should be used for the subject.PermissionSubjectsubject()StringtoString()
-
-
-
Constructor Detail
-
PermissionsSetupEventImpl
public PermissionsSetupEventImpl(PermissionSubject subject, PermissionProvider provider)
-
-
Method Detail
-
subject
public PermissionSubject subject()
- Specified by:
subjectin interfacePermissionsSetupEvent
-
createFunction
public PermissionFunction createFunction(PermissionSubject subject)
Uses the provider function to obtain aPermissionFunctionfor the subject.- Specified by:
createFunctionin interfacePermissionsSetupEvent- Parameters:
subject- the subject- Returns:
- the obtained permission function
-
provider
public PermissionProvider provider()
- Specified by:
providerin interfacePermissionsSetupEvent
-
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.- Specified by:
setProviderin interfacePermissionsSetupEvent- Parameters:
provider- the provider
-
-