[Bleeding] Implemented Inventory.{get,set}MaxStackSize(). Addresses BUKKIT-1076
- Custom inventories also respect this setting now.
This commit is contained in:
committed by
EvilSeph
parent
66e067f373
commit
5c8fd4995f
@@ -14,6 +14,8 @@ public class InventoryCraftResult implements IInventory {
|
||||
private ItemStack[] items = new ItemStack[1];
|
||||
|
||||
// CraftBukkit start
|
||||
private int maxStack = MAX_STACK;
|
||||
|
||||
public ItemStack[] getContents() {
|
||||
return this.items;
|
||||
}
|
||||
@@ -27,6 +29,10 @@ public class InventoryCraftResult implements IInventory {
|
||||
public List<HumanEntity> getViewers() {
|
||||
return new ArrayList<HumanEntity>();
|
||||
}
|
||||
|
||||
public void setMaxStackSize(int size) {
|
||||
maxStack = size;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
public InventoryCraftResult() {}
|
||||
@@ -70,7 +76,7 @@ public class InventoryCraftResult implements IInventory {
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
return 64;
|
||||
return maxStack; // CraftBukkit
|
||||
}
|
||||
|
||||
public void update() {}
|
||||
|
||||
Reference in New Issue
Block a user