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