Are you looking for a script that allows you to protect your blocks from being broken by any player?
Now with the Block Protection script, you can protect your blocks, and you can also select any block and make it breakable by any player by adding the block's ID to a list called the breakable block list.
You can use it inside your custom map or your realm.
How It Works
First, you have to type this command in chat.
- /tag @s add admin
To be able to use block protection features and break your world's blocks
If any player tries to break any block of your world, the script cancels the event and returns the block to its place if the player doesn't have the tag "admin."
Select version for changelog:
Updated for Minecraft 1.20.41