In the Vanish Status plugin, I am using your API method IsInvisible to determine whether a player is invisible. However, there are instances where it returns true for players who are visible, leading to the display "You are invisible" in their status bars.
private bool IsInvisible(BasePlayer player) => Vanish != null && (bool)Vanish.Call("IsInvisible", player);
private void SendBar(BasePlayer player)
{
if (player == null || player.IsNpc || !player.IsConnected || !IsInvisible(player)) return;
*Sending Status bar*
}
Is it possible to create a new API method that checks a player in the _hiddenPlayers list?
private bool IsInvisible(BasePlayer player) => player?._limitedNetworking ?? false;
like this:
private bool IsInvisible(BasePlayer player) => _hiddenPlayers.Contains(player);