From 4d92f11cc805a52906abf974c6caf043035f5b4c Mon Sep 17 00:00:00 2001 From: AkjaHAsLk1IALk0MasH <46046453+AgaSpace@users.noreply.github.com> Date: Sun, 14 May 2023 09:56:47 +0700 Subject: [PATCH] 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`) --- TShockAPI/TSPlayer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 8aadacdf..c9194c36 100644 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -1147,6 +1147,11 @@ namespace TShockAPI get { return TPlayer.team; } } + /// + /// Gets PvP player mode. + /// + public bool Hostile => TPlayer.hostile; + /// /// Gets the player's X coordinate. ///