net.forthecrown.grenadier.annotations.compiler.PermissionPredicate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grenadier-annotations Show documentation
Show all versions of grenadier-annotations Show documentation
Annotation-based command support for Grenadier
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