Sponge get the name of clicked inventory

whenever a player has a double-chest opened, no matter if they click on their inventory or double-chest inventory, I’ll always get the name of double-chest inventory from the following e.getTargetInventory().getName().get()
how would I check if they’re clicking on their inventory or the double-chest?

Tried putting this piece of code into the check

if(e.getTargetInventory().getArchetype() == InventoryArchetypes.PLAYER) {

but it’s archetype is double-chest ( org.spongepowered.common.item.inventory.archetype.CompositeInventoryArchetype) no matter which one is clicked…
also tried to check the slot count, but both inventories have “90” slots.

I’m concerned that target inventory always returns the first inventory, in this case, the opened one.

Got it working with the help of the following