diff --git a/plugin-playground/src/main/kotlin/ChatboxHelmets/plugin.kt b/plugin-playground/src/main/kotlin/ChatboxHelmets/plugin.kt index 58200f9..8bf2de4 100644 --- a/plugin-playground/src/main/kotlin/ChatboxHelmets/plugin.kt +++ b/plugin-playground/src/main/kotlin/ChatboxHelmets/plugin.kt @@ -113,7 +113,7 @@ class plugin : Plugin() { private fun getConfig() { val cleanUsername = getCleanUserName() - println(cleanUsername) + //println(cleanUsername) // Abort if we are pre-login if (cleanUsername.isEmpty()) return diff --git a/plugin-playground/src/main/kotlin/KondoKit/.DS_Store b/plugin-playground/src/main/kotlin/KondoKit/.DS_Store deleted file mode 100644 index 4caffea..0000000 Binary files a/plugin-playground/src/main/kotlin/KondoKit/.DS_Store and /dev/null differ diff --git a/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/GitLabConfig.kt b/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/GitLabConfig.kt index 3aec747..abc0fd0 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/GitLabConfig.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/GitLabConfig.kt @@ -1,15 +1,11 @@ package KondoKit.pluginmanager -/** - * Configuration object for GitLab API settings that can be shared between - * GitLabPluginFetcher and PluginDownloadManager - */ object GitLabConfig { const val GITLAB_PROJECT_ID = "38297322" - const val GITLAB_PROJECT_PATH = "2009scape/tools/client-plugins" // Using path from DownloadManager + const val GITLAB_PROJECT_PATH = "2009scape/tools/client-plugins" const val GITLAB_BRANCH = "master" - const val DEBUG = true // Set to false to disable debug logging + const val DEBUG = false // Spams pretty hard fun getGitLabApiBaseUrl(): String = "https://gitlab.com/api/v4/projects/$GITLAB_PROJECT_ID" @@ -18,8 +14,7 @@ object GitLabConfig { fun getRawFileUrl(filePath: String): String = "${getGitLabApiBaseUrl()}/repository/files/${filePath.replace("/", "%2F")}/raw?ref=${GITLAB_BRANCH}" - - // Archive URL helper + fun getArchiveBaseUrl(): String = "https://gitlab.com/$GITLAB_PROJECT_PATH/-/archive/$GITLAB_BRANCH/${GITLAB_PROJECT_PATH.replace("/", "-")}-$GITLAB_BRANCH.zip" diff --git a/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/PluginDownloadManager.kt b/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/PluginDownloadManager.kt index 43b388f..55dddcc 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/PluginDownloadManager.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/PluginDownloadManager.kt @@ -98,7 +98,6 @@ object PluginDownloadManager { GitLabConfig.getArchiveUrlWithRefType(plugin.path), // Format 2: Using ref parameter GitLabConfig.getArchiveUrl(plugin.path), - // Format 3: Direct archive URL without path parameter (we'll filter later) GitLabConfig.getArchiveBaseUrl() ) diff --git a/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/PluginLogger.kt b/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/PluginLogger.kt index f84de71..8e73b5c 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/PluginLogger.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/pluginmanager/PluginLogger.kt @@ -1,9 +1,5 @@ package KondoKit.pluginmanager -/** - * Shared lightweight logger so pluginmanager classes don't each redefine - * their own debug helper tied to GitLabConfig.DEBUG. - */ object PluginLogger { fun debug(tag: String, message: String) { if (GitLabConfig.DEBUG) { diff --git a/plugin-playground/src/main/kotlin/KondoKit/ui/View.kt b/plugin-playground/src/main/kotlin/KondoKit/ui/View.kt index 672a53a..a6aaf82 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/ui/View.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/ui/View.kt @@ -2,9 +2,6 @@ package KondoKit.ui import javax.swing.JPanel -/** - * Contract implemented by UI views; kept in a dedicated UI package to avoid tangling with concrete implementations. - */ interface View { val name: String val iconSpriteId: Int diff --git a/plugin-playground/src/main/kotlin/KondoKit/ui/ViewConstants.kt b/plugin-playground/src/main/kotlin/KondoKit/ui/ViewConstants.kt index 276b730..ff5cda1 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/ui/ViewConstants.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/ui/ViewConstants.kt @@ -3,9 +3,6 @@ package KondoKit.ui import java.awt.Dimension import java.awt.Font -/** - * Shared constants for fonts, dimensions, and colors across the entire KondoKit plugin. - */ object ViewConstants { val FONT_RUNESCAPE_SMALL_16 = Font("RuneScape Small", Font.TRUETYPE_FONT, 16) val FONT_RUNESCAPE_SMALL_14 = Font("RuneScape Small", Font.PLAIN, 14) diff --git a/plugin-playground/src/main/kotlin/KondoKit/util/FileUtils.kt b/plugin-playground/src/main/kotlin/KondoKit/util/FileUtils.kt index 930ac97..587173c 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/util/FileUtils.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/util/FileUtils.kt @@ -2,9 +2,6 @@ package KondoKit.util import java.io.File -/** - * File-related helpers shared across the plugin to avoid ad-hoc copies. - */ object FileUtils { fun deleteRecursively(file: File): Boolean { if (file.isDirectory) { diff --git a/plugin-playground/src/main/kotlin/KondoKit/util/Helpers.kt b/plugin-playground/src/main/kotlin/KondoKit/util/Helpers.kt index a849771..bbe1fd9 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/util/Helpers.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/util/Helpers.kt @@ -15,7 +15,6 @@ import java.util.Timer import javax.swing.* object Helpers { - // Convenience helper for loading resources relative to the KondoKit plugin class fun openResource(path: String) = plugin::class.java.getResourceAsStream(path) // Read a bundled resource as text using the given charset (UTF-8 by default) diff --git a/plugin-playground/src/main/kotlin/KondoKit/util/HttpFetcher.kt b/plugin-playground/src/main/kotlin/KondoKit/util/HttpFetcher.kt index d4fcacc..8f0ff40 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/util/HttpFetcher.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/util/HttpFetcher.kt @@ -4,9 +4,6 @@ import java.io.IOException import java.net.HttpURLConnection import java.net.URL -/** - * Lightweight helper for opening GET connections with shared defaults so callers don't repeat header setup. - */ object HttpFetcher { const val DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" diff --git a/plugin-playground/src/main/kotlin/KondoKit/util/JsonParser.kt b/plugin-playground/src/main/kotlin/KondoKit/util/JsonParser.kt index ea66ea3..5829df9 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/util/JsonParser.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/util/JsonParser.kt @@ -3,9 +3,6 @@ package KondoKit.util import com.google.gson.Gson import com.google.gson.reflect.TypeToken -/** - * Centralizes JSON parsing to reuse the same Gson configuration everywhere. - */ object JsonParser { val gson: Gson = Gson() diff --git a/plugin-playground/src/main/kotlin/KondoKit/util/SpriteToBufferedImage.kt b/plugin-playground/src/main/kotlin/KondoKit/util/SpriteToBufferedImage.kt index 5bc04fa..3383231 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/util/SpriteToBufferedImage.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/util/SpriteToBufferedImage.kt @@ -7,7 +7,6 @@ import rt4.SoftwareSprite import java.awt.Color import java.awt.image.BufferedImage -// Define interfaces for common sprite types interface BaseSprite { val width: Int val height: Int @@ -22,7 +21,6 @@ interface NonIndexedSprite : BaseSprite { val pixels: IntArray? } -// Adapter functions for existing sprite types fun adaptSoftwareSprite(sprite: SoftwareSprite): NonIndexedSprite { return object : NonIndexedSprite { override val width: Int = sprite.width diff --git a/plugin-playground/src/main/kotlin/KondoKit/util/XPTable.kt b/plugin-playground/src/main/kotlin/KondoKit/util/XPTable.kt index 0eee492..2869985 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/util/XPTable.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/util/XPTable.kt @@ -1,8 +1,5 @@ package KondoKit.util -/** - * Utility for mapping XP values to levels and vice versa. - */ object XPTable { private val xpForLevels: IntArray = IntArray(100) diff --git a/plugin-playground/src/main/kotlin/KondoKit/views/ReflectiveEditorView.kt b/plugin-playground/src/main/kotlin/KondoKit/views/ReflectiveEditorView.kt index 452c9fa..e4775b4 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/views/ReflectiveEditorView.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/views/ReflectiveEditorView.kt @@ -30,7 +30,6 @@ import kotlin.math.ceil if it is implemented. Check GroundItems plugin for an example. */ - object ReflectiveEditorView : View { var reflectiveEditorView: JPanel? = null const val VIEW_NAME = "REFLECTIVE_EDITOR_VIEW" diff --git a/plugin-playground/src/main/kotlin/KondoKit/views/ViewLayoutHelpers.kt b/plugin-playground/src/main/kotlin/KondoKit/views/ViewLayoutHelpers.kt index 69e3779..0f2aec0 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/views/ViewLayoutHelpers.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/views/ViewLayoutHelpers.kt @@ -12,10 +12,6 @@ import javax.swing.Box import javax.swing.BoxLayout import javax.swing.JPanel -/** - * Utility helpers shared across view implementations to avoid duplicating - * common UI wiring such as search rows and vertical panel setup. - */ object ViewLayoutHelpers { data class SearchFieldSection( @@ -63,9 +59,6 @@ object ViewLayoutHelpers { return SearchFieldSection(wrapper = wrapper, searchField = searchField) } - /** - * Provides a BoxLayout.Y_AXIS panel with the default view background. - */ fun createVerticalPanel(background: Color = VIEW_BACKGROUND_COLOR): JPanel { return JPanel().apply { layout = BoxLayout(this, BoxLayout.Y_AXIS)