mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 11:05:13 +01:00
[Bleeding] DoubleChestInventory.getHolder() no longer returns null. Addresses BUKKIT-995
This commit is contained in:
parent
f27427ad19
commit
76cc488402
2 changed files with 7 additions and 1 deletions
|
@ -43,7 +43,7 @@ public class InventoryLargeChest implements IInventory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public InventoryHolder getOwner() {
|
public InventoryHolder getOwner() {
|
||||||
return null; // Double chests technically have multiple owners, so there's no sensible way to pick one
|
return null; // This method won't be called since CraftInventoryDoubleChest doesn't defer to here
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.bukkit.craftbukkit.inventory;
|
package org.bukkit.craftbukkit.inventory;
|
||||||
|
|
||||||
|
import org.bukkit.block.DoubleChest;
|
||||||
import org.bukkit.inventory.DoubleChestInventory;
|
import org.bukkit.inventory.DoubleChestInventory;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
@ -50,4 +51,9 @@ public class CraftInventoryDoubleChest extends CraftInventory implements DoubleC
|
||||||
right.setContents(rightItems);
|
right.setContents(rightItems);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DoubleChest getHolder() {
|
||||||
|
return new DoubleChest(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue