[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
@@ -45,6 +45,11 @@ public class InventoryLargeChest implements IInventory {
|
||||
public InventoryHolder getOwner() {
|
||||
return null; // This method won't be called since CraftInventoryDoubleChest doesn't defer to here
|
||||
}
|
||||
|
||||
public void setMaxStackSize(int size) {
|
||||
this.left.setMaxStackSize(size);
|
||||
this.right.setMaxStackSize(size);
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
public InventoryLargeChest(String s, IInventory iinventory, IInventory iinventory1) {
|
||||
@@ -90,7 +95,7 @@ public class InventoryLargeChest implements IInventory {
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
return this.left.getMaxStackSize();
|
||||
return Math.min(this.left.getMaxStackSize(), this.right.getMaxStackSize()); // CraftBukkit - check both sides
|
||||
}
|
||||
|
||||
public void update() {
|
||||
|
||||
Reference in New Issue
Block a user