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 given CommandSender have the permission represented by this object?

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minestom.server.permission.Permission

    read, write
  • Constructor Details

  • Method Details

    • isValidFor

      public boolean isValidFor​(@NotNull PermissionHandler permissionHandler, java.lang.Object data)
      Description copied from interface: Permission
      Does the given CommandSender have the permission represented by this object?

      Called with PermissionHandler.hasPermission(Permission), the CommandSender requires to both have this permission and validate the condition in this method.

      Specified by:
      isValidFor in interface Permission<java.lang.Object>
      Parameters:
      permissionHandler - the permission handler
      data - the optional data (eg the number of home possible, placing a block at X position)
      Returns:
      true if the commandSender possesses this permission