Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

Fix invsee might cause items to disappear (#3065)

Open tanyaofei opened this issue 6 months ago • 0 comments

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

tanyaofei avatar Aug 12 '24 02:08 tanyaofei