0

I'm making a horror map and I have signs over a door acting as planks over a door and I already have a set up where you can't break the signs unless you have the item needed.
But how could I add something to where a line of text would pop up saying "You need a crowbar." if you try to break the signs without it?

1 Answer 1

2

This might not be exactly what you want but I have a workaround. Try running this in a repeating command block:

/execute at @a[tag=(something to mark that this player hasn't aquired the crowbar)] if block ~~-1~ (block of choice) run /tell @p (text of choice)

Then set your block of choice (not the same one as the rest of the floor) in front of the door. Whenever a player walks over this block it will tell them whatever you set the block to say.

Then set a second repeating command block to run:

/execute at @a[hasitem={item=(whatever your crowbar item is),location=slot.weapon.mainhand}] run /tag @p remove (whatever tag you selected)

so that when a player holds the crowbar they get the tag removed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.