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

Fix invsee might cause items to disappear (#3065) #5902

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

tanyaofei
Copy link

@tanyaofei tanyaofei commented Aug 12, 2024

Information

This PR fixes #3065.

Details

This is an upstream bug. This PR doesn’t fix it but rather avoids triggering it.

Proposed fix:

Slots 35 ~ 40 refer to player's equipment slots in the server side, but refer to bottom inventory in the client side.
When a player(A) try to drag an item into his inventory, Bukkit treats it as dragging to the players(B)'s equipment slots. Since the inventory view cannot display B's equipment slots, A might mistakenly think the item has disappeared. Therefore, this PR added a Listener to cancel the InventoryDragEvent

Environments tested:

OS: MacOS

Java version: 17

  • [X ] Paper 1.21

Demonstration:

EssentialsX-2.21.0-dev+null-f1a5caf.jar.zip

@mdcfe mdcfe self-requested a review August 25, 2024 21:59
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

Successfully merging this pull request may close these issues.

Items are randomly swapped and deleted when using invsee
1 participant