Minecraft – ny way to remotely disable a command block

minecraft-commandsminecraft-java-edition

I'm trying to make a cool thing in minecraft. and I need to disable a certain command block with a flick of a switch. Is there any command that I can put in a command block the will disable command blocks? I don't want to disable all of them, just one. Anything I can do about this?

Best Answer

Try setting the command block to chain and conditional and chaining it after a repeating command block that checks if a lever is flicked, the command should look something like this: /execute if block <coordinates to the lever> minecraft:lever[powered=true]