mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-01 05:58:00 +01:00
Fix ghost item when cancelling inventory click
This commit is contained in:
parent
7d4e04bc66
commit
098a12961d
@ -88,6 +88,14 @@ public class WindowListener {
|
||||
// Prevent the player from picking a ghost item in cursor
|
||||
refreshCursorItem(player, inventory);
|
||||
|
||||
// Prevent ghost item when the click is cancelled
|
||||
if (!successful) {
|
||||
player.getInventory().update();
|
||||
if (inventory != null) {
|
||||
inventory.update(player);
|
||||
}
|
||||
}
|
||||
|
||||
WindowConfirmationPacket windowConfirmationPacket = new WindowConfirmationPacket();
|
||||
windowConfirmationPacket.windowId = windowId;
|
||||
windowConfirmationPacket.actionNumber = actionNumber;
|
||||
|
Loading…
Reference in New Issue
Block a user