Package net.minestom.server.permission
Class BasicPermission
java.lang.Object
net.minestom.server.permission.BasicPermission
- All Implemented Interfaces:
Permission<java.lang.Object>
public class BasicPermission extends java.lang.Object implements Permission<java.lang.Object>
Basic
Permission
implementation that only requires the permission to be given to the CommandSender
to be considered applied
(eg. no arguments)-
Constructor Summary
Constructors Constructor Description BasicPermission()
-
Method Summary
Modifier and Type Method Description boolean
isValidFor(PermissionHandler permissionHandler, java.lang.Object data)
Does the givenCommandSender
have the permission represented by this object?
-
Constructor Details
-
BasicPermission
public BasicPermission()
-
-
Method Details
-
isValidFor
Description copied from interface:Permission
Does the givenCommandSender
have the permission represented by this object?Called with
PermissionHandler.hasPermission(Permission)
, theCommandSender
requires to both have this permission and validate the condition in this method.- Specified by:
isValidFor
in interfacePermission<java.lang.Object>
- Parameters:
permissionHandler
- the permission handlerdata
- the optional data (eg the number of home possible, placing a block at X position)- Returns:
- true if the commandSender possesses this permission
-