target the entity the player is interacting with

I'm trying to make a chest minecart act as an enderchest. To make it multiplayer friendly I need to ensure that only the player who summoned the minecart can access it.

How would I ensure that the minecart the player is interacting with is the one I target to check if it belongs to them? at the moment I'm using a "trigger": "player_interacted_with_entity" advancement to detect the minecart interaction.

Continue to help post