Skip to content

Commit

Permalink
Sync Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NotZer0Two committed Jul 29, 2024
1 parent 92af4ce commit d9f220d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions EXILED/Exiled.API/Extensions/MirrorExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace Exiled.API.Extensions
using PlayerRoles;
using PlayerRoles.FirstPersonControl;
using PlayerRoles.PlayableScps.Scp049.Zombies;
using PlayerRoles.Voice;
using RelativePositioning;

using Respawning;
Expand Down Expand Up @@ -181,6 +182,18 @@ public static void PlayGunSound(this Player player, Vector3 position, ItemType i
player.Connection.Send(message);
}

/// <summary>
/// Sets <see cref="Features.Intercom.DisplayText"/> that only the <paramref name="target"/> player can see.
/// </summary>
/// <param name="target">Only this player can see Display Text.</param>
/// <param name="text">Text displayed to the player.</param>
public static void SetIntercomDisplayTextForTargetOnly(this Player target, string text) => target.SendFakeSyncVar(IntercomDisplay._singleton.netIdentity, typeof(IntercomDisplay), nameof(IntercomDisplay.Network_overrideText), text);

/// <summary>
/// Resync <see cref="Features.Intercom.DisplayText"/>.
/// </summary>
public static void ResetIntercomDisplayText() => ResyncSyncVar(IntercomDisplay._singleton.netIdentity, typeof(IntercomDisplay), nameof(IntercomDisplay.Network_overrideText));

/// <summary>
/// Sets <see cref="Room.Color"/> of a <paramref name="room"/> that only the <paramref name="target"/> player can see.
/// </summary>
Expand Down
5 changes: 5 additions & 0 deletions EXILED/Exiled.API/Features/Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ public static bool IsWhitelisted
set => ServerConsole.WhiteListEnabled = value;
}

/// <summary>
/// Gets the List of player currently whitelisted.
/// </summary>
public static HashSet<string> WhitelistedPlayers => WhiteList.Users;

/// <summary>
/// Gets a value indicating whether or not this server is verified.
/// </summary>
Expand Down

0 comments on commit d9f220d

Please sign in to comment.