Expectation
The inventory of a trapped double chest should be of type DoubleChestInventory (CraftInventoryDoubleChest) as in older versions (1.12 and earlier), so that its holder is of type DoubleChest.
Reality
The inventory of a trapped double chest is of type Inventory (CraftInventory) and its holder is of type Chest.
Example
import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Chest; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.DoubleChestInventory; import org.bukkit.inventory.Inventory; import org.bukkit.plugin.java.JavaPlugin; public class ExamplePlugin extends JavaPlugin implements Listener { @Override public void onEnable() { getServer().getPluginManager().registerEvents(this, this); } @EventHandler public void onPlayerInteract(PlayerInteractEvent e) { Block b = e.getClickedBlock(); if (b.getType() == Material.CHEST || b.getType() == Material.TRAPPED_CHEST) { Chest chest = (Chest) b.getState(); Inventory inv = chest.getInventory(); if (inv instanceof DoubleChestInventory) { e.getPlayer().sendMessage("This is a double chest"); } else { e.getPlayer().sendMessage("This is not a double chest: " + inv.getClass().getName()); } } } }