[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
@@ -20,6 +20,7 @@ public class PlayerInventory implements IInventory {
|
||||
|
||||
// CraftBukkit start
|
||||
public List<HumanEntity> transaction = new ArrayList<HumanEntity>();
|
||||
private int maxStack = MAX_STACK;
|
||||
|
||||
public ItemStack[] getContents() {
|
||||
return this.items;
|
||||
@@ -44,6 +45,10 @@ public class PlayerInventory implements IInventory {
|
||||
public InventoryHolder getOwner() {
|
||||
return this.player.getBukkitEntity();
|
||||
}
|
||||
|
||||
public void setMaxStackSize(int size) {
|
||||
maxStack = size;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
public PlayerInventory(EntityHuman entityhuman) {
|
||||
@@ -350,7 +355,7 @@ public class PlayerInventory implements IInventory {
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
return 64;
|
||||
return maxStack; // CraftBukkit
|
||||
}
|
||||
|
||||
public int a(Entity entity) {
|
||||
|
||||
Reference in New Issue
Block a user