-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c1b59d
commit 8037068
Showing
2 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
package online.bingiz.bilibili.video.internal.engine | ||
|
||
import okhttp3.OkHttpClient | ||
import online.bingiz.bilibili.video.api.event.TripleSendRewardsEvent | ||
import online.bingiz.bilibili.video.internal.cache.* | ||
import online.bingiz.bilibili.video.internal.database.Database | ||
|
@@ -9,17 +8,13 @@ import online.bingiz.bilibili.video.internal.engine.drive.BilibiliApiDrive | |
import online.bingiz.bilibili.video.internal.engine.drive.BilibiliPassportDrive | ||
import online.bingiz.bilibili.video.internal.entity.* | ||
import online.bingiz.bilibili.video.internal.helper.* | ||
import online.bingiz.bilibili.video.internal.interceptor.ReceivedCookiesInterceptor | ||
import online.bingiz.bilibili.video.internal.interceptor.UserAgentInterceptor | ||
import org.bukkit.Bukkit | ||
import retrofit2.Call | ||
import retrofit2.Callback | ||
import retrofit2.Response | ||
import retrofit2.Retrofit | ||
import retrofit2.converter.gson.GsonConverterFactory | ||
import taboolib.common.platform.ProxyPlayer | ||
import taboolib.common.platform.function.pluginId | ||
import taboolib.common.platform.function.pluginVersion | ||
import taboolib.common.platform.function.submit | ||
import taboolib.common.platform.function.warning | ||
import taboolib.module.chat.colored | ||
|
@@ -32,9 +27,6 @@ import taboolib.module.nms.NMSMap | |
* @constructor Create empty Network engine | ||
*/ | ||
object NetworkEngine { | ||
private val client = OkHttpClient.Builder().addInterceptor(ReceivedCookiesInterceptor()) | ||
.addInterceptor(UserAgentInterceptor("MinecraftPlugin $pluginId/$pluginVersion([email protected])")).build() | ||
|
||
/** | ||
* Bilibili API | ||
* 哔哩哔哩API驱动 | ||
|
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/online/bingiz/bilibili/video/internal/helper/OkHttpClient.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package online.bingiz.bilibili.video.internal.helper | ||
|
||
import okhttp3.OkHttpClient | ||
import online.bingiz.bilibili.video.internal.interceptor.ReceivedCookiesInterceptor | ||
import online.bingiz.bilibili.video.internal.interceptor.UserAgentInterceptor | ||
import taboolib.common.platform.function.pluginId | ||
import taboolib.common.platform.function.pluginVersion | ||
|
||
|
||
internal val client = OkHttpClient.Builder().addInterceptor(ReceivedCookiesInterceptor()) | ||
.addInterceptor(UserAgentInterceptor("MinecraftPlugin $pluginId/$pluginVersion([email protected])")).build() |