1

I am making a minigame in Minecraft Education Edition, and want to make it so some players can open and close doors, while another has to break them with an axe. I want it so even if the player is holding anything else they can only break the door with that one axe. How would I do this? I am using 1.19.51.2

1 Answer 1

2

If they are in adventure mode, you could use the Item Component can_destroy when giving them the item. Keep in mind if they are in adventure mode they cannot break any blocks without using items with the can_destroy property.

# Give yourself a netherite axe that can only destroy oak doors.
/give @s netherite_axe 1 0 {"minecraft:can_destroy":{"blocks":["oak_door"]}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .