--- a/net/minecraft/world/inventory/DispenserMenu.java
+++ b/net/minecraft/world/inventory/DispenserMenu.java
@@ -12,7 +_,11 @@
     private static final int INV_SLOT_END = 36;
     private static final int USE_ROW_SLOT_START = 36;
     private static final int USE_ROW_SLOT_END = 45;
-    private final Container dispenser;
+    public final Container dispenser;
+    // CraftBukkit start
+    private @javax.annotation.Nullable org.bukkit.craftbukkit.inventory.CraftInventoryView view = null;
+    private final Inventory inventory;
+    // CraftBukkit end
 
     public DispenserMenu(int containerId, Inventory playerInventory) {
         this(containerId, playerInventory, new SimpleContainer(9));
@@ -20,6 +_,9 @@
 
     public DispenserMenu(int containerId, Inventory playerInventory, Container container) {
         super(MenuType.GENERIC_3x3, containerId);
+        // CraftBukkit start - Save player
+        this.inventory = playerInventory;
+        // CraftBukkit end
         checkContainerSize(container, 9);
         this.dispenser = container;
         container.startOpen(playerInventory.player);
@@ -38,6 +_,7 @@
 
     @Override
     public boolean stillValid(Player player) {
+        if (!this.checkReachable) return true; // CraftBukkit
         return this.dispenser.stillValid(player);
     }
 
@@ -77,4 +_,17 @@
         super.removed(player);
         this.dispenser.stopOpen(player);
     }
+
+    // CraftBukkit start
+    @Override
+    public org.bukkit.craftbukkit.inventory.CraftInventoryView getBukkitView() {
+        if (this.view != null) {
+            return this.view;
+        }
+
+        org.bukkit.craftbukkit.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventory(this.dispenser);
+        this.view = new org.bukkit.craftbukkit.inventory.CraftInventoryView(this.inventory.player.getBukkitEntity(), inventory, this);
+        return this.view;
+    }
+    // CraftBukkit end
 }
