Updated CraftBukkit to 1.2

This commit is contained in:
Nathan Adams
2012-03-01 10:49:23 +00:00
parent e9ca87000c
commit 543c4879fe
143 changed files with 3710 additions and 4433 deletions

View File

@@ -73,6 +73,20 @@ public class CraftInventoryCustom extends CraftInventory {
return result;
}
public ItemStack splitWithoutUpdate(int i) {
ItemStack stack = this.getItem(i);
ItemStack result;
if (stack == null) return null;
if (stack.count <= 1) {
this.setItem(i, null);
result = stack;
} else {
result = new ItemStack(stack.id, 1, stack.getData());
stack.count -= 1;
}
return result;
}
public void setItem(int i, ItemStack itemstack) {
items[i] = itemstack;
}