--- a/net/minecraft/world/inventory/InventoryMenu.java
+++ b/net/minecraft/world/inventory/InventoryMenu.java
@@ -44,9 +_,13 @@
     private static final EquipmentSlot[] SLOT_IDS = new EquipmentSlot[]{EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET};
     public final boolean active;
     private final Player owner;
+    private @javax.annotation.Nullable org.bukkit.craftbukkit.inventory.CraftInventoryView view = null; // CraftBukkit
 
     public InventoryMenu(Inventory playerInventory, boolean active, final Player owner) {
-        super(null, 0, 2, 2);
+        // CraftBukkit start
+        super(null, 0, 2, 2, playerInventory); // CraftBukkit
+        this.setTitle(net.minecraft.network.chat.Component.translatable("container.crafting")); // SPIGOT-4722: Allocate title for player inventory
+        // CraftBukkit end
         this.active = active;
         this.owner = owner;
         this.addResultSlot(owner, 154, 28);
@@ -188,4 +_,17 @@
     protected Player owner() {
         return this.owner;
     }
+
+    // CraftBukkit start
+    @Override
+    public org.bukkit.craftbukkit.inventory.CraftInventoryView getBukkitView() {
+        if (this.view != null) {
+            return this.view;
+        }
+
+        org.bukkit.craftbukkit.inventory.CraftInventoryCrafting inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryCrafting(this.craftSlots, this.resultSlots);
+        this.view = new org.bukkit.craftbukkit.inventory.CraftInventoryView(this.owner.getBukkitEntity(), inventory, this);
+        return this.view;
+    }
+    // CraftBukkit end
 }
