Update from upstream SpigotMC

Fixed: Check cast SpigotMC/Spigot@7efa75c63a
This commit is contained in:
Zach Brown 2014-08-06 18:00:55 -05:00
parent b01bcb4e17
commit 47f9c99934

View file

@ -16,9 +16,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Spigot Start
+ if ( tileentity instanceof IInventory )
+ {
+ for ( org.bukkit.craftbukkit.entity.CraftHumanEntity h : new ArrayList<org.bukkit.craftbukkit.entity.CraftHumanEntity>( (List) ( (IInventory) tileentity ).getViewers() ) )
+ for ( org.bukkit.entity.HumanEntity h : new ArrayList<org.bukkit.entity.HumanEntity>( (List) ( (IInventory) tileentity ).getViewers() ) )
+ {
+ h.getHandle().closeInventory();
+ if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
+ {
+ ( (org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeInventory();
+ }
+ }
+ }
+ // Spigot End
@ -32,9 +35,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Spigot Start
+ if ( entity instanceof IInventory )
+ {
+ for ( org.bukkit.craftbukkit.entity.CraftHumanEntity h : new ArrayList<org.bukkit.craftbukkit.entity.CraftHumanEntity>( (List) ( (IInventory) entity ).getViewers() ) )
+ for ( org.bukkit.entity.HumanEntity h : new ArrayList<org.bukkit.entity.HumanEntity>( (List) ( (IInventory) entity ).getViewers() ) )
+ {
+ h.getHandle().closeInventory();
+ if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
+ {
+ ( (org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeInventory();
+ }
+ }
+ }
+ // Spigot End