Skip to content

Commit

Permalink
feat: send to player specific settings (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
LumiFae authored Feb 13, 2025
1 parent 61c1c23 commit 571f49e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions EXILED/Exiled.API/Features/Core/UserSettings/SettingBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@ public static void SendToAll(Func<Player, bool> predicate)
/// <param name="player">Target player.</param>
public static void SendToPlayer(Player player) => ServerSpecificSettingsSync.SendToPlayer(player.ReferenceHub);

/// <summary>
/// Syncs specific settings with the specified target.
/// </summary>
/// <param name="player">Target player.</param>
/// <param name="settings">Settings to send to the player.</param>
public static void SendToPlayer(Player player, IEnumerable<SettingBase> settings) =>
ServerSpecificSettingsSync.SendToPlayer(player.ReferenceHub, settings.Select(setting => setting.Base).ToArray());

/// <summary>
/// Registers all settings from the specified collection.
/// </summary>
Expand Down

0 comments on commit 571f49e

Please sign in to comment.