Move close inventories patch up

This commit is contained in:
md_5 2013-06-28 14:16:30 +10:00
parent a40b3f90c7
commit 4bf5a2ead4

View file

@ -1,4 +1,4 @@
From affe0720b0b6a658336755f7cae15049e3c12c9a Mon Sep 17 00:00:00 2001
From ad44b01ddbd663ce087352ac51b2043e8d592330 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 27 Jun 2013 17:26:09 +1000
Subject: [PATCH] Properly Close Inventories
@ -42,7 +42,7 @@ index e8d30c5..4879db6 100644
// Do not pass along players, as doing so can get them stuck outside of time.
// (which for example disables inventory icon updates and prevents block breaking)
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index c207076..4666f24 100644
index c207076..45d2767 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -149,6 +149,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
@ -50,9 +50,9 @@ index c207076..4666f24 100644
public void c(int i) {
+ // Spigot Start
+ for ( HumanEntity human : transaction )
+ for ( org.bukkit.craftbukkit.entity.CraftHumanEntity human : new java.util.ArrayList<org.bukkit.craftbukkit.entity.CraftHumanEntity>() )
+ {
+ ( (org.bukkit.craftbukkit.entity.CraftHumanEntity) human ).getHandle().closeInventory();
+ human.closeInventory();
+ }
+ // Spigot End
this.b = false;