forked from AgentBlackout/ARainbowTags
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRainbowTagMod.cs
39 lines (33 loc) · 1.03 KB
/
RainbowTagMod.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Linq;
using Exiled.API.Features;
using UnityEngine;
namespace RainbowTags
{
public class RainbowTagMod : Plugin<Config>
{
public static RainbowTagMod RainbowTagRef { get; private set; }
public override string Name => nameof(RainbowTags);
public override string Author => "FruitBoi";
public EventHandler Handler;
public RainbowTagMod()
{
RainbowTagRef = this;
}
public override void OnEnabled()
{
if (RainbowTagRef.Config.UseCustomSequence)
RainbowTagController.Colors = RainbowTagRef.Config.CustomSequence;
Handler = new EventHandler(this);
Exiled.Events.Handlers.Player.Joined += Handler.OnPlayerJoinEvent;
Exiled.Events.Handlers.Server.RoundStarted += Handler.OnRoundStartEvent;
}
public override void OnDisabled()
{
Exiled.Events.Handlers.Server.RoundStarted -= Handler.OnRoundStartEvent;
Exiled.Events.Handlers.Player.Joined -= Handler.OnPlayerJoinEvent;
Handler = null;
}
public override void OnReloaded() { }
}
}