mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 05:03:55 -07:00
[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
@@ -18,6 +18,8 @@ public class ContainerEnchantTableSubcontainer implements IInventory {
|
||||
|
||||
// CraftBukkit start
|
||||
public List<HumanEntity> transaction = new ArrayList<HumanEntity>();
|
||||
public org.bukkit.entity.Player player;
|
||||
private int maxStack = MAX_STACK;
|
||||
|
||||
public ItemStack[] getContents() {
|
||||
return this.items;
|
||||
@@ -38,6 +40,10 @@ public class ContainerEnchantTableSubcontainer implements IInventory {
|
||||
public InventoryHolder getOwner() {
|
||||
return null; // TODO: Enchanting tables don't really have an owner? Maybe they should?
|
||||
}
|
||||
|
||||
public void setMaxStackSize(int size) {
|
||||
maxStack = size;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
public ContainerEnchantTableSubcontainer(String s, int i) {
|
||||
@@ -102,7 +108,7 @@ public class ContainerEnchantTableSubcontainer implements IInventory {
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
return 64;
|
||||
return maxStack; // CraftBukkit
|
||||
}
|
||||
|
||||
public void update() {
|
||||
|
Reference in New Issue
Block a user