diff options
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java index daa6e313..95eb6163 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java @@ -49,9 +49,11 @@ public class CraftInventoryView extends InventoryView { @Override public void setItem(int slot, ItemStack item) { + net.minecraft.server.ItemStack stack = CraftItemStack.createNMSItemStack(item); if (slot != -999) { - CraftItemStack stack = new CraftItemStack(item); - container.getSlot(slot).set(stack.getHandle()); + container.getSlot(slot).set(stack); + } else { + player.getHandle().drop(stack); } } |