I'm making a battlefield and want to include an area for "admins" and the like to enter and leave a certain area without others being able to do the same thing. I don't want to use commands such as teleporting, as it will be too jarring to see, and I want it to be a legitimate door.

Is there a way to prevent someone from using a lever? For example, if someone had a certain tag or item on them, they are unable to right-click the lever. I'm on 1.17.1.

  • You can prevent the redstone circuit from executing with a command block attached to the lever. I can’t write up a full answer currently, but I think all you need is a command block, redstone dust and torch along with a comparator. Since the lever activates redstone you can use it to power the command block and have the command block complete the circuit if it detects the tag. Aug 11 at 2:34
  • That would work, provided that I wasn't attempting to put the lever right next to the door lol. I wouldn't be able to do that since it would power the door anyway. Aug 11 at 2:49
  • You could add a one block buffer between the lever and door to prevent it from opening; but, it doesn’t sound like you want to do that. I’m not sure if it can be accomplished with scoreboard or not, but who knows. 🤷🏻‍♀️ Aug 11 at 2:56
  • 1
    I might try to form an actual answer another day, but for anyone who may try or even the op, make a scoreboard with the criteria [use.lever] and and two command block under the door, one that will check if it is open + someone with a tag+score, if so, open and another that is reverse. Make sure the lever isn't conected to the door. Aug 11 at 12:21
  • So, i just found out that the used criteria is for placed blocks, not when you act on them (so not when you press the lever, but rather, when you place the block lever). Would it be enough to open the door if the corret player is close enough? Aug 11 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.