Gamerules apply globally, affecting all players or entities within a world. However, with the addition of targeting specific entities, we can set gamerules that apply only to certain entities based on criteria such as team, type, tags, nbt, etc.
Syntax:
/gamerule <rule name> [<value>] <targets>
Examples:
Keep Inventory for Red Team
/gamerule keepInventory true @a[team=Red]
Disable Keep Inventory for Blue Team
/gamerule keepInventory false @a[team=Blue]
Disable Fall Damage for Pigs
/gamerule fallDamage false @e[type=pig]
Disable Fire Damage for Zombies with NoBurning Tag
/gamerule fireDamage false @e[type=zombie,tag=NoBurning]
Please sign in to leave a comment.
1 Comments