Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
64480dc
few things
1zun4 Dec 16, 2024
570156b
Merge branch 'nextgen' into feat/marketplace
1zun4 Jan 7, 2025
78d6256
merge fix
1zun4 Jan 7, 2025
0a75484
Merge branch 'nextgen' into feat/marketplace
1zun4 Jan 8, 2025
e90fa75
continue marketplace implementation
1zun4 Jan 8, 2025
2cc622a
feat: filtering
1zun4 Jan 9, 2025
6160db4
chore: copyright header
1zun4 Jan 9, 2025
79f0f3b
chore: remove new lines
1zun4 Jan 12, 2025
195c08b
Merge branch 'nextgen' into feat/marketplace
1zun4 Mar 28, 2025
870a5bf
feat: marketplace interop
1zun4 Mar 29, 2025
673164a
feat: marketplace interop
1zun4 Mar 29, 2025
e99e90e
refactor
1zun4 Mar 29, 2025
abe3a91
continue a bit
1zun4 Mar 29, 2025
88532a2
Merge branch 'nextgen' into feat/marketplace
1zun4 Sep 1, 2025
3afbea5
fix: merge
1zun4 Sep 1, 2025
c743870
refactor(MarketplaceApi): type serialization
1zun4 Sep 1, 2025
737b878
feat: installation and auto-updating
1zun4 Sep 2, 2025
80f16c0
refactor: use suspendable handler
1zun4 Sep 2, 2025
12a2c56
fix: http client
1zun4 Sep 2, 2025
2408d19
refactor: featured query param
1zun4 Sep 2, 2025
4564c8b
fix: subscribe type check
1zun4 Sep 2, 2025
f4d26ef
feat: item click action
1zun4 Sep 2, 2025
528b138
fix: error on unsubscribe
1zun4 Sep 2, 2025
0105eb1
chore: no only featured by default
1zun4 Sep 2, 2025
63495c1
feat(list): featured only parameter
1zun4 Sep 2, 2025
8f363f5
fix(SubscribedItem): exclude directory from serialization
1zun4 Sep 2, 2025
799092f
feat(UnsubscribeCommand): ID auto-completion
1zun4 Sep 2, 2025
ced113e
fix: forgot to commit
1zun4 Sep 2, 2025
e3d51dd
feat: support theme selection
1zun4 Sep 2, 2025
211745c
fix: detekt
1zun4 Sep 2, 2025
0fc79a6
refactor(theme): README and publishing workflow
1zun4 Sep 2, 2025
1bc0c9e
feat(ScriptManager): loading marketplace items
1zun4 Sep 2, 2025
0b87c72
fix: do not list other
1zun4 Sep 2, 2025
f4c91da
fix: pre-load marketplace before update
1zun4 Sep 2, 2025
b621d56
feat: named choice on item type
1zun4 Sep 2, 2025
6079200
feat: auto reload on script
1zun4 Sep 2, 2025
8e8d22a
fix: complete anyway
1zun4 Sep 2, 2025
e5c8137
feat: update command
1zun4 Sep 2, 2025
4c72da4
fix: detekt
1zun4 Sep 2, 2025
b33b482
feat: nice to have messages
1zun4 Sep 2, 2025
4ec319b
fix: do not premark with a version tag
1zun4 Sep 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/kotlin/net/ccbluex/liquidbounce/LiquidBounce.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import net.ccbluex.liquidbounce.features.itemgroup.ClientItemGroups
import net.ccbluex.liquidbounce.features.itemgroup.groups.heads
import net.ccbluex.liquidbounce.features.misc.AccountManager
import net.ccbluex.liquidbounce.features.misc.FriendManager
import net.ccbluex.liquidbounce.features.misc.MarketplaceSubscriptionManager
import net.ccbluex.liquidbounce.features.misc.proxy.ProxyManager
import net.ccbluex.liquidbounce.features.module.ModuleManager
import net.ccbluex.liquidbounce.features.module.modules.client.ipcConfiguration
Expand Down Expand Up @@ -158,6 +159,7 @@ object LiquidBounce : EventListener {
ConfigSystem.root(ClientItemGroups)
ConfigSystem.root(LanguageManager)
ConfigSystem.root(ClientAccountManager)
ConfigSystem.root(MarketplaceSubscriptionManager)
BrowserManager
FontManager
PostRotationExecutor
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/net/ccbluex/liquidbounce/api/core/BaseApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ abstract class BaseApi(protected val baseUrl: String) {

protected suspend inline fun <reified T> delete(
endpoint: String,
body: RequestBody? = null,
crossinline headers: Headers.Builder.() -> Unit = {}
): T = request(endpoint, HttpMethod.DELETE, headers)
): T = request(endpoint, HttpMethod.DELETE, headers, body)

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import net.minecraft.client.texture.NativeImageBackedTexture
import okhttp3.*
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.RequestBody.Companion.toRequestBody
import okio.BufferedSource
import java.io.File
import java.io.IOException
import java.io.InputStream
Expand Down Expand Up @@ -125,9 +124,9 @@ suspend inline fun <reified T> Response.parse(): T {
return use {
when (T::class) {
String::class -> body.string() as T
ByteArray::class -> body.bytes() as T
Unit::class -> Unit as T
InputStream::class -> body.byteStream() as T
BufferedSource::class -> body.source() as T
NativeImageBackedTexture::class -> body.byteStream().use { stream ->
NativeImageBackedTexture(NativeImage.read(stream)) as T
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ data class ClientAccount(
@Exclude
var cosmetics: Set<Cosmetic>? = null
) {
private suspend fun takeSession(): OAuthSession = session?.takeIf { !it.accessToken.isExpired() } ?: run {
suspend fun takeSession(): OAuthSession = session?.takeIf { !it.accessToken.isExpired() } ?: run {
renew()
session ?: error("No session")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
*
* Copyright (c) 2015 - 2025 CCBlueX
*
* LiquidBounce is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LiquidBounce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*/
package net.ccbluex.liquidbounce.api.models.marketplace

import com.google.gson.annotations.SerializedName

data class MarketplaceItem(
val id: Int,
val uid: String,
val type: MarketplaceItemType,
val name: String,
val branch: String,
val description: String,
@SerializedName("thumbnail_pid")
val thumbnailPid: String?,
val featured: Boolean,
@SerializedName("created_at")
val createdAt: String,
val status: MarketplaceItemStatus
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
*
* Copyright (c) 2015 - 2025 CCBlueX
*
* LiquidBounce is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LiquidBounce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*/
package net.ccbluex.liquidbounce.api.models.marketplace

import com.google.gson.annotations.SerializedName

data class MarketplaceItemRevision(
val id: Int,
@SerializedName("item_id")
val itemId: Int,
val version: String,
@SerializedName("file_pid")
val filePid: String,
val changelog: String?,
@SerializedName("created_at")
val createdAt: String,
val status: MarketplaceItemStatus
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
*
* Copyright (c) 2015 - 2025 CCBlueX
*
* LiquidBounce is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LiquidBounce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*/
package net.ccbluex.liquidbounce.api.models.marketplace

import com.google.gson.annotations.SerializedName

enum class MarketplaceItemStatus {
@SerializedName("Active")
ACTIVE,
@SerializedName("Inactive")
INACTIVE,
@SerializedName("Pending")
PENDING,
@SerializedName("Rejected")
REJECTED,
@SerializedName("Deleted")
DELETED
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
*
* Copyright (c) 2015 - 2025 CCBlueX
*
* LiquidBounce is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LiquidBounce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*/
package net.ccbluex.liquidbounce.api.models.marketplace

import com.google.gson.annotations.SerializedName

enum class MarketplaceItemType {
@SerializedName("Script")
SCRIPT,
@SerializedName("Config")
CONFIG,
@SerializedName("Theme")
THEME,
@SerializedName("Other")
OTHER
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
*
* Copyright (c) 2015 - 2025 CCBlueX
*
* LiquidBounce is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LiquidBounce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*/
package net.ccbluex.liquidbounce.api.models.marketplace

import com.google.gson.annotations.SerializedName

data class MarketplaceReview(
val id: Int,
@SerializedName("item_id")
val itemId: Int,
val uid: String,
val rating: Int,
val review: String?,
@SerializedName("created_at")
val createdAt: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
*
* Copyright (c) 2015 - 2025 CCBlueX
*
* LiquidBounce is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LiquidBounce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*/
package net.ccbluex.liquidbounce.api.models.marketplace

import com.google.gson.annotations.SerializedName

data class MarketplaceRevisionDependency(
val id: Int,
@SerializedName("revision_id")
val revisionId: Int,
@SerializedName("dependency_revision_id")
val dependencyRevisionId: Int,
@SerializedName("created_at")
val createdAt: String,
@SerializedName("dependency_revision")
val dependencyRevision: MarketplaceItemRevision?
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package net.ccbluex.liquidbounce.api.models.pagination

data class PaginatedResponse<T>(
val items: List<T>,
val pagination: Pagination
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package net.ccbluex.liquidbounce.api.models.pagination

data class Pagination(
val current: Int,
val pages: Int,
val items: Int
)
Loading
Loading