Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions EXILED/Exiled.API/Features/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ public static void Broadcast(ushort duration, string message, global::Broadcast.
Server.Broadcast.RpcAddElement(message, duration, type);
}

/// <summary>
/// Broadcasts delegate invocation result to all <see cref="Player">players</see>.
/// </summary>
/// <param name="duration">The duration in seconds.</param>
/// <param name="func">The delegate whose invocation result will be the message.</param>
public static void Broadcast(ushort duration, Func<Player, string> func)
{
foreach (Player player in Player.List)
player.Broadcast(duration, func.Invoke(player));
}

/// <summary>
/// Shows a hint to all <see cref="Player">players</see>.
/// </summary>
Expand Down