fix bad handling for middle click

This commit is contained in:
alexcrea 2026-08-19 15:25:40 +02:00
parent 8e7153a746
commit eeaa87ba98
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 = "1.19.1" version = "1.20.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

@ -197,6 +197,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) {
@ -351,6 +354,8 @@ class AnvilResultListener : Listener {
inventory.setItem(ANVIL_OUTPUT_SLOT, null) inventory.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