When using /damage
to damage an entity and specifying another entity on the same team as the cause, if friendlyFire
is disabled for that team, the message “Target is invulnerable to the given damage type" will be printed, even though the damage type was not the reason the command failed. This also affects the case where pvp is disabled and a player is specified as both the source and the target.
This also affects entities damaging themselves.
To reproduce
/team add team1
/team join team1 @s
/team modify team1 friendlyFire false
Go into survival mode if you are not already
/damage @s 3 minecraft:player_attack by @s
❌ The message “Target is invulnerable to the given damage type” is printed
Expected behavior
The message fir friendly fire would say “Target cannot be damaged by [source] since friendly fire is disabled for their team”. The message for pvp would say “Target cannot be damaged by [source] since PVP is disabled”.
Thank you for your report!
After consideration, the issue is being closed as Invalid.
You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki