public static Tristate convertTristate(org.spongepowered.api.util.Tristate tristate) {
        Objects.requireNonNull(tristate, "tristate");
        return switch (tristate) {
            case TRUE -> Tristate.TRUE;
            case FALSE -> Tristate.FALSE;
            default -> Tristate.UNDEFINED;
        };
    }
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