Interface PermissionChecker<S extends CommandSource>


@AvailableSince("1.0.0") public interface PermissionChecker<S extends CommandSource>
Represents a functional way of checking for the permissions of the command source/sender.
  • Method Details

    • hasPermission

      boolean hasPermission(@NotNull S source, @Nullable @Nullable String permission)
      Parameters:
      source - the source of the command (console or other)
      permission - the permission
      Returns:
      whether this command source/sender has a specific permission
    • hasPermission

      default boolean hasPermission(@NotNull S source, @NotNull @NotNull PermissionHolder holder)
    • checkPermission

      default Pair<PermissionHolder,Boolean> checkPermission(@NotNull S source, @NotNull @NotNull PermissionHolder holder)