Geyser icon indicating copy to clipboard operation
Geyser copied to clipboard

InventoryClickEvent gets triggered multiple times when player inventory gets closed and crafting slots are full

Open bilektugrul opened this issue 1 year ago • 1 comments

Describe the bug

I'm trying to add persistent items to crafting slots that would execute some commands when clicked. It wasn't possible with basic ways, so kinda did a hacky workaround with constantly filling 2x2 crafting grid slots. Now plugin works fine in Java Edition players, but whenever Bedrock players close their inventory, every slot in the grid triggers InventoryClickEvent.

This might be because I'm filling the slots constantly, even when they have their inventory open and when they are closing their inventory but even though I'm doing that, the system should just work, like in Java players.

To Reproduce

  1. Create a plugin and use this code. You might see those items in your hotbar slots, ignore it. Another fix is required for that.
  2. Create a InventoryClickListener that debugs clicked slot number and whatever else you want to see.
  3. Join with Java Edition, open and close your inventory, observe that nothing happens, debugs will not be printed.
  4. Now try that with Bedrock Edition and observe that debugs will be printed.

Expected behaviour

InventoryClickEvent must not be triggered when Bedrock players close their inventory.
In Java Edition, only a Paper event called PlayerInventorySlotChangeEvent gets triggered and Geyser should trigger that too.

Screenshots / Videos

No response

Server Version and Plugins

Paper version 1.21.1-132-ver/1.21.1@b48403b (2024-11-21T10:14:27Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT) Essentials, NBTAPI, floodgate, Skript and skript-reflect for debugging and ViaVersion

Geyser Dump

No response

Geyser Version

1.2.0

Minecraft: Bedrock Edition Device/Version

Latest

Additional Context

I had no VPS/VDS and could not use Geyser in my local so I used a free hosting, didn't have access to Geyser version and dump.

bilektugrul avatar Jan 03 '25 07:01 bilektugrul

Any news about this?

bilektugrul avatar Mar 02 '25 14:03 bilektugrul