When a player attempts to damage themselves using a projectile (eg. arrow), explosive (eg. TNT) or the /damage
command, they will fail if they are on a team with friendlyFire disabled or if /gamerule pvp
is set to false.
This is very longstanding behavior and may be intended, but it does constitute a design consideration which minigame creators and others must account for, and precludes some interesting possibilities. It also allows players to use TNT for combat and excavation more fearlessly than they would otherwise be able to. While having three options for these settings (false
, true
and self_only
) is by far the best approach, an argument could be made that allowing players to damage themselves when these settings are false
would lead to more intuitive experiences compared to current behavior, to the point where the current behavior constitutes a bug.
To reproduce
/gamerule pvp false
Give yourself TNT and a flint and steel
Switch to survival
Jump in some water
Place and ignite some TNT, and swim right into it as it explodes
❌ You take no damage
Expected behavior
You would take damage, since you were just being careless (or rather, you would have been if you had been blast fishing for real) and the pvp gamerule is only intended to disable deliberate attacks against other players.
Note
This report is a semi-clone of MC-253438, but for several reasons (misleading wording in that report, it pertaining only to arrows, moderator resolution) I opted to create a new one so that Mojang’s stance on the issue is clearly known.
An
except_melee
option for these settings would also be nice to have; see my Feedback Discord post here.