public static Set<Context> convertContexts(ContextSet contexts) {
        Objects.requireNonNull(contexts, "contexts");

        if (contexts.isEmpty()) {
            return EMPTY;
        }

        return new ForwardingImmutableContextSet(contexts.immutableCopy());
    }
Utility class for converting between Sponge and LuckPerms context and tristate classes
sponge/sponge-service/src/main/java/me/lucko/luckperms/sponge/service/CompatibilityUtil.java