various fixes + new custom class shadowmancer
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using PlayerRoles;
|
||||
using LabApi.Features;
|
||||
using LabApi.Features.Wrappers;
|
||||
|
||||
namespace VisibleSpectators;
|
||||
@@ -42,6 +41,12 @@ public static class PlayerDisplayUtil
|
||||
{ "TEAL", "008080" },
|
||||
{ "GOLD", "EFC01A" }
|
||||
};
|
||||
|
||||
private static readonly Dictionary<string, (string Color, string Name)> PlayerSpecificDisplays = new()
|
||||
{
|
||||
{ "76561198372750067@steam", ("DEAFCC", "1+1=10") },
|
||||
{ "76561198372587687@steam", ("9933FF", "HoherGeist") }
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Returns a formatted display string for a player, with color.
|
||||
@@ -49,6 +54,12 @@ public static class PlayerDisplayUtil
|
||||
public static string PlayerToDisplay(Player player)
|
||||
{
|
||||
if (player is not { IsReady: true }) return string.Empty;
|
||||
|
||||
if (PlayerSpecificDisplays.TryGetValue(player.UserId, out var specificDisplay))
|
||||
{
|
||||
return $"<color=#{specificDisplay.Color}>{specificDisplay.Name}</color>";
|
||||
}
|
||||
|
||||
const string defaultColor = "FFFFFF";
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user