SPIGOT-1107: Shift clicking and delegation for custom inventories
PR #398 By: Jannyboy11 <jannyboy11@gmail.com>
This commit is contained in:
@@ -271,7 +271,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
|
||||
private void openCustomInventory(Inventory inventory, EntityPlayer player, String windowType) {
|
||||
if (player.playerConnection == null) return;
|
||||
Container container = new CraftContainer(inventory, this, player.nextContainerCounter());
|
||||
Container container = new CraftContainer(inventory, this.getHandle(), player.nextContainerCounter());
|
||||
|
||||
container = CraftEventFactory.callInventoryOpenEvent(player, container);
|
||||
if(container == null) return;
|
||||
@@ -345,7 +345,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
if (inventory instanceof CraftInventoryView) {
|
||||
container = ((CraftInventoryView) inventory).getHandle();
|
||||
} else {
|
||||
container = new CraftContainer(inventory, player.nextContainerCounter());
|
||||
container = new CraftContainer(inventory, this.getHandle(), player.nextContainerCounter());
|
||||
}
|
||||
|
||||
// Trigger an INVENTORY_OPEN event
|
||||
|
||||
Reference in New Issue
Block a user