When a player has an oak staircase directly in front of them, I would like a command block to place a barrier under them.
The command I have used that fails is:
/execute @a ~ ~ ~ detect ~1 ~1 ~ minecraft:oak_stairs /setblock ~ ~-1 ~ barrier
I will use multiple command blocks with a similar command to make it work on all sides of the player.
I also need a way to where the player leaves the oak stairs it would remove the barrier.
My Minecraft has messed up and nothing I can do can fix it but it cant show my the command block output no matter what I try. Can someone please try and help me with this, nothing I can find helps me at all.