Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bilektugrul opened this issue Jan 3, 2025 · 0 comments

Comments

@bilektugrul
Copy link

bilektugrul commented Jan 3, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant