All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.forthecrown.grenadier.annotations.compiler.PermissionPredicate Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package net.forthecrown.grenadier.annotations.compiler;

import java.util.Objects;
import java.util.function.Predicate;
import net.forthecrown.grenadier.CommandSource;

class PermissionPredicate implements Predicate {

  private final String permission;

  public PermissionPredicate(String permission) {
    Objects.requireNonNull(permission);
    this.permission = permission;
  }

  @Override
  public boolean test(CommandSource source) {
    return source.hasPermission(permission);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy