Set Console Command for Block
gamerule mobGriefing false
@s = self · @p = nearest player · @a = all players · @e = all entities
Previous Output
-Beginner · 1 block
Press a button to turn off mobGriefing, stopping mobs such as Creepers and Endermen from changing or destroying blocks.
What you need
Expected result
Mobs can no longer change or destroy blocks through behavior controlled by this rule, while players can still build and mine normally.
Configure one block at a time
The copy button copies only Command Input. Choose every other value in the Command Block screen.
Attach a button to the Impulse Block and press it once. To restore the rule later, use /gamerule mobGriefing true.
gamerule mobGriefing false
@s = self · @p = nearest player · @a = all players · @e = all entities
-If it does not work