package net.minecraft.commands; import net.minecraft.server.commands.PermissionCheck; public interface PermissionSource { boolean hasPermission(int level); default boolean allowsSelectors() { return this.hasPermission(2); } public record Check(int requiredLevel) implements PermissionCheck { public boolean test(T source) { return source.hasPermission(this.requiredLevel); } } }