fix bad handling for middle click
Some checks failed
Java CI with Gradle / build (push) Has been cancelled

This commit is contained in:
alexcrea 2026-08-19 15:25:40 +02:00
parent 4b8e71c5e9
commit 74d2e38272
Signed by: alexcrea
GPG key ID: E59DF23EE2A2266C
2 changed files with 6 additions and 1 deletions

View file

@ -21,7 +21,7 @@ plugins {
} }
group = "xyz.alexcrea" group = "xyz.alexcrea"
version = "2.0.2" version = "2.1.0"
val isDevBuild = System.getenv("SMALL_COMMIT_HASH") != null val isDevBuild = System.getenv("SMALL_COMMIT_HASH") != null
val isPreRelease = System.getenv("IS_GITHUB_PRERELEASE") == "true" val isPreRelease = System.getenv("IS_GITHUB_PRERELEASE") == "true"

View file

@ -196,6 +196,9 @@ class AnvilResultListener : Listener {
result result
) )
) return ) return
else if(player.gameMode != GameMode.CREATIVE) {
return
}
// Finally, we add the item to the player // Finally, we add the item to the player
if (slotDestination.type == SlotType.CURSOR) { if (slotDestination.type == SlotType.CURSOR) {
@ -347,6 +350,8 @@ class AnvilResultListener : Listener {
view.setItem(ANVIL_OUTPUT_SLOT, null) view.setItem(ANVIL_OUTPUT_SLOT, null)
} else if(player.gameMode != GameMode.CREATIVE) {
return false
} }
// Finally, we add the item to the player // Finally, we add the item to the player