mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-12 09:51:12 +01:00
SPIGOT-4840: CartographyInventory not returned for InventoryClickEvent.getClickedInventory on result slot
This commit is contained in:
parent
8ad64c4f99
commit
3be0bc1c51
2 changed files with 10 additions and 2 deletions
|
@ -22,7 +22,7 @@
|
|||
+ return bukkitEntity;
|
||||
+ }
|
||||
+
|
||||
+ CraftInventoryCartography inventory = new CraftInventoryCartography(this.inventory);
|
||||
+ CraftInventoryCartography inventory = new CraftInventoryCartography(this.inventory, this.f);
|
||||
+ bukkitEntity = new CraftInventoryView(this.player, inventory, this);
|
||||
+ return bukkitEntity;
|
||||
+ }
|
||||
|
|
|
@ -5,7 +5,15 @@ import org.bukkit.inventory.CartographyInventory;
|
|||
|
||||
public class CraftInventoryCartography extends CraftInventory implements CartographyInventory {
|
||||
|
||||
public CraftInventoryCartography(IInventory inventory) {
|
||||
private final IInventory resultInventory;
|
||||
|
||||
public CraftInventoryCartography(IInventory inventory, IInventory resultInventory) {
|
||||
super(inventory);
|
||||
this.resultInventory = resultInventory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return super.getSize() + resultInventory.getSize();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue