protected QueryOptions calculate(S subject) {
        ImmutableContextSet.Builder accumulator = new ImmutableContextSetImpl.BuilderImpl();
        ContextConsumer consumer = accumulator::add;

        for (ContextCalculator<? super S> calculator : this.calculators.calculators()) {
            callContextCalculator(calculator, subject, consumer);
        }

        QueryOptions.Builder builder = this.plugin.getConfiguration().get(ConfigKeys.GLOBAL_QUERY_OPTIONS).toBuilder().context(accumulator.build());
        customizeQueryOptions(subject, builder);
        return builder.build();
    }
Base implementation of {@link ContextManager}.

@param <S> the subject type
@param <P> the player type
common/src/main/java/me/lucko/luckperms/common/context/manager/ContextManager.java