Added the TSPlayer.Hostile property.

It gets `TPlayer.hostile`.
I also wanted to add the ability to change `TPlayer.hostile`, but noticed a property `TSPlayer.Team`. You can only use the `TSPlayer.SetTeam` method to change it. So it's exactly the same here: You can use the method `TSPlayer.SetPvP` (By the way, it should be renamed to `TSPlayer.SetHostile`)
This commit is contained in:
AkjaHAsLk1IALk0MasH 2023-05-14 09:56:47 +07:00
parent 2f7514c0ef
commit 4d92f11cc8

View file

@ -1147,6 +1147,11 @@ namespace TShockAPI
get { return TPlayer.team; }
}
/// <summary>
/// Gets PvP player mode.
/// </summary>
public bool Hostile => TPlayer.hostile;
/// <summary>
/// Gets the player's X coordinate.
/// </summary>