mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-01 05:58:00 +01:00
Fix cursor item dropping when drop event is cancelled
This commit is contained in:
parent
dff29a4717
commit
f588d1103f
@ -952,7 +952,10 @@ public class Player extends LivingEntity {
|
||||
cursorItem = openInventory.getCursorItem(this);
|
||||
}
|
||||
if (!cursorItem.isAir()) {
|
||||
dropItem(cursorItem);
|
||||
// Add item to inventory if he hasn't been able to drop it
|
||||
if (!dropItem(cursorItem)) {
|
||||
getInventory().addItemStack(cursorItem);
|
||||
}
|
||||
}
|
||||
|
||||
CloseWindowPacket closeWindowPacket = new CloseWindowPacket();
|
||||
|
Loading…
Reference in New Issue
Block a user