Minecraft – How to make a lever disappear after one use

minecraft-java-edition

Me and a friend have a private server where we try all sorts of things. We want to make a one use lever. Can this be done?

Best Answer

Using a command block to break the lever is the simplest solution.

Execute command after lever is pulled:

/setblock <X> <Y> <Z> minecraft:air 0 destroy

The XYZ is the coords of the lever. The "destroy" old block handling makes the command drop the item.