various fixes + new custom class shadowmancer

This commit is contained in:
2025-07-12 20:18:02 +02:00
parent 0615f8aeea
commit 78fa56dce9
10 changed files with 356 additions and 10 deletions
+12 -1
View File
@@ -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
{