SPIGOT-6478: Double chests opened by plugins don't play their closing animation.

This commit is contained in:
blablubbabc 2021-05-29 08:41:34 +10:00 committed by md_5
parent fd905ab527
commit 5912843493
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -29,7 +29,6 @@ import net.minecraft.world.level.block.BlockEnchantmentTable;
import net.minecraft.world.level.block.BlockWorkbench;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.TileEntity;
import net.minecraft.world.level.block.entity.TileEntityContainer;
import net.minecraft.world.level.block.state.IBlockData;
import org.bukkit.GameMode;
import org.bukkit.Location;
@ -295,7 +294,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
}
Containers<?> container = CraftContainer.getNotchInventoryType(inventory);
if (iinventory instanceof TileEntityContainer) {
if (iinventory instanceof ITileInventory) {
getHandle().openContainer(iinventory);
} else {
openCustomInventory(inventory, player, container);