diff --git a/src/main/java/net/minestom/server/entity/Player.java b/src/main/java/net/minestom/server/entity/Player.java index afd25b2ff..9a2ad0093 100644 --- a/src/main/java/net/minestom/server/entity/Player.java +++ b/src/main/java/net/minestom/server/entity/Player.java @@ -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();