Add Template, more custom classes & fix issues

This commit is contained in:
2025-06-08 00:54:06 +02:00
parent c9bee028d9
commit 73a4da1edd
9 changed files with 466 additions and 53 deletions
+8 -2
View File
@@ -6,11 +6,11 @@ using LabApi.Events.Handlers;
using LabApi.Features;
using LabApi.Features.Console;
using LabApi.Features.Wrappers;
using MEC;
using PlayerRoles;
using PlayerRoles.PlayableScps.Scp079;
using PlayerRoles.PlayableScps.Scp096;
using PlayerRoles.PlayableScps.Scp3114;
using Timer = System.Timers.Timer;
namespace SCPTeamHint;
@@ -19,6 +19,7 @@ public class Plugin : LabApi.Loader.Features.Plugins.Plugin
private readonly object _hintsLock = new();
private readonly Dictionary<Player, Hint> _spectatorHints = new();
private Timer _timer;
public override string Name => "SCPTeamHint";
public override string Author => "HoherGeist, Code002Lover";
public override Version Version { get; } = new(1, 0, 0);
@@ -31,13 +32,18 @@ public class Plugin : LabApi.Loader.Features.Plugins.Plugin
PlayerEvents.Joined += OnJoin;
PlayerEvents.Left += OnLeft;
Timing.CallContinuously(1, UpdateHints);
_timer = new Timer(1000);
_timer.Elapsed += (_, _) => UpdateHints();
_timer.Start();
}
public override void Disable()
{
PlayerEvents.Joined -= OnJoin;
PlayerEvents.Left -= OnLeft;
_timer?.Stop();
_timer?.Dispose();
_timer = null;
}
private void UpdateHints()