How can you find out with the execute command whether a player is sitting in a minecart (lore)?
PS. I play in the Java Edition.
First I would spawn a minecart.
Minecart is created:
/ summon minecart ~ ~ ~ {Tags: ["Test"]}
Checking whether a player is sitting in the Minecart:
/ execute positioned as @e [tag = Test] if entity @p [distance = .0.5]
after that you can of course execute a command if this is positive
/ execute positioned as @e [tag = Test] if entity @p [distance = .0.5] run say Hello
Many Thanks