File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,6 +144,14 @@ impl Client {
144144 self . is_secure
145145 }
146146
147+ pub fn url ( & self ) -> & str {
148+ & self . url
149+ }
150+
151+ pub fn session_token ( & self ) -> & str {
152+ & self . session_token
153+ }
154+
147155 /// Request all blog posts
148156 pub async fn blog_posts ( & self , page : u32 ) -> Result < PaginatedResponse < BlogPost > > {
149157 self . request_from_endpoint ( API_V3 , & format ! ( "blog?page={}" , page) ) . await
Original file line number Diff line number Diff line change @@ -163,6 +163,17 @@ pub async fn launch<D: Send + Sync>(
163163 & features,
164164 ) ?;
165165
166+ // Launcher Args (-D<name>=<value>)
167+ command_arguments. push ( format ! ( "-Dnet.ccbluex.liquidbounce.api.url={}" , launching_parameter. client. url( ) ) ) ;
168+ command_arguments. push ( format ! ( "-Dnet.ccbluex.liquidbounce.api.secure={}" , launching_parameter. client. is_secure( ) ) ) ;
169+ command_arguments. push ( format ! ( "-Dnet.ccbluex.liquidbounce.api.token={}" , launching_parameter. client. session_token( ) ) ) ;
170+
171+ if let Some ( client_account) = & launching_parameter. client_account {
172+ command_arguments. push ( format ! ( "-Dnet.ccbluex.liquidbounce.account.access_token={}" , client_account. get_access_token( ) . secret( ) ) ) ;
173+ command_arguments. push ( format ! ( "-Dnet.ccbluex.liquidbounce.account.refresh_token={}" , client_account. get_refresh_token( ) . secret( ) ) ) ;
174+ command_arguments. push ( format ! ( "-Dnet.ccbluex.liquidbounce.account.expires_at={}" , client_account. get_expires_at( ) ) ) ;
175+ }
176+
166177 // Custom Arguments
167178 command_arguments. extend ( launching_parameter. jvm_args . iter ( ) . cloned ( ) ) ;
168179
You can’t perform that action at this time.
0 commit comments