Interface PermissionChecker<S extends Source>


@AvailableSince("1.0.0") public interface PermissionChecker<S extends Source>
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 CommandParameter<S> parameter)
    • hasUsagePermission

      default Pair<String,Boolean> hasUsagePermission(S source, @Nullable @Nullable CommandUsage<S> usage)