summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWesley Wolfe <weswolf@aol.com>2012-03-02 12:52:45 -0600
committerEvilSeph <evilseph@gmail.com>2012-03-15 21:47:29 -0400
commit77ceb0002cf2c36d5177f1edeacc277cae2b956e (patch)
tree6da1788f47cb5fd077a16c5fb08eb657d3529601
parent42822ddca4f99fc5b5296b26ed7367f4bdb26318 (diff)
downloadcraftbukkit-77ceb0002cf2c36d5177f1edeacc277cae2b956e.tar
craftbukkit-77ceb0002cf2c36d5177f1edeacc277cae2b956e.tar.gz
craftbukkit-77ceb0002cf2c36d5177f1edeacc277cae2b956e.tar.lz
craftbukkit-77ceb0002cf2c36d5177f1edeacc277cae2b956e.tar.xz
craftbukkit-77ceb0002cf2c36d5177f1edeacc277cae2b956e.zip
Fix losing enchants from stacked items in custom inventories
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
index 8621fcf0..eb2546e6 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
@@ -66,7 +66,7 @@ public class CraftInventoryCustom extends CraftInventory {
this.setItem(i, null);
result = stack;
} else {
- result = new ItemStack(stack.id, j, stack.getData());
+ result = new ItemStack(stack.id, j, stack.getData(), stack.getEnchantments());
stack.count -= j;
}
this.update();
@@ -81,7 +81,7 @@ public class CraftInventoryCustom extends CraftInventory {
this.setItem(i, null);
result = stack;
} else {
- result = new ItemStack(stack.id, 1, stack.getData());
+ result = new ItemStack(stack.id, 1, stack.getData(), stack.getEnchantments());
stack.count -= 1;
}
return result;