Report correct god mode status to target player

The previous version of the code always told the player having their god
mode toggled the state of the player that issued the command, rather
than their own god mode state. This fixes that issue, and now returns
the correct player's state to the correct player.
This commit is contained in:
Lucas Nicodemus 2021-11-20 20:02:23 -08:00
parent f523d38300
commit 1aa9956e45
2 changed files with 2 additions and 1 deletions

View file

@ -6697,7 +6697,7 @@ namespace TShockAPI
if (!args.Silent || (playerToGod == args.Player))
{
playerToGod.SendSuccessMessage(string.Format("You are {0} in god mode.", args.Player.GodMode ? "now" : "no longer"));
playerToGod.SendSuccessMessage(string.Format("You are {0} in god mode.", playerToGod.GodMode ? "now" : "no longer"));
}
}