From f2d0cf8daf7600cf80899c1f38e0db08f1c44a7e Mon Sep 17 00:00:00 2001 From: Panav Bindal <102317251+Pan-nav@users.noreply.github.com> Date: Sun, 17 Nov 2024 23:02:11 +0000 Subject: [PATCH 1/2] GUI builder slot action filters click events in player inventory --- src/main/kotlin/gg/flyte/twilight/gui/GUI.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/gg/flyte/twilight/gui/GUI.kt b/src/main/kotlin/gg/flyte/twilight/gui/GUI.kt index af3b215..407c640 100644 --- a/src/main/kotlin/gg/flyte/twilight/gui/GUI.kt +++ b/src/main/kotlin/gg/flyte/twilight/gui/GUI.kt @@ -30,7 +30,7 @@ class GUI(val title: Component, val size: Int, val type: InventoryType, val cont lateinit var viewer: Player private val clickEvent = event { - if (inventory != this@GUI.inventory) return@event + if (clickedInventory != this@GUI.inventory) return@event slotAction[slot]?.invoke(this) } From 709b5be008a7b5482fec11533d7a1e1c5d08aa9b Mon Sep 17 00:00:00 2001 From: Josh <43449531+joshbker@users.noreply.github.com> Date: Sun, 17 Nov 2024 23:14:18 +0000 Subject: [PATCH 2/2] chore: bump ver 1.1.16 --- README.md | 6 +++--- build.gradle.kts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eb399e3..3a4a643 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Maven gg.flyte twilight - 1.1.15 + 1.1.16 ``` @@ -33,14 +33,14 @@ maven { url "https://repo.flyte.gg/releases" } -implementation "gg.flyte:twilight:1.1.15" +implementation "gg.flyte:twilight:1.1.16" ``` Gradle (Kotlin DSL) ```kotlin maven("https://repo.flyte.gg/releases") -implementation("gg.flyte:twilight:1.1.15") +implementation("gg.flyte:twilight:1.1.16") ``` Certain features of Twilight require configuration, which can be done via the Twilight class. To setup a Twilight class instance, you can use the `twilight` function as shown below: diff --git a/build.gradle.kts b/build.gradle.kts index 374fb40..59321ec 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } group = "gg.flyte" -version = "1.1.15" +version = "1.1.16" repositories { mavenLocal()