Skip to content

Commit

Permalink
update: 优化代码结构
Browse files Browse the repository at this point in the history
  • Loading branch information
BingZi-233 committed Dec 26, 2023
1 parent 8c1b59d commit 8037068
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
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
Expand All @@ -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
Expand All @@ -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驱动
Expand Down
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()

0 comments on commit 8037068

Please sign in to comment.