mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Update from upstream SpigotMC
Fixed: Check cast SpigotMC/Spigot@7efa75c63a
This commit is contained in:
parent
b01bcb4e17
commit
47f9c99934
1 changed files with 10 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue