-
Notifications
You must be signed in to change notification settings - Fork 0
/
RoundlockPlugin.cs
45 lines (39 loc) · 1.3 KB
/
RoundlockPlugin.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
40
41
42
43
44
45
using System;
using Exiled.API.Features;
using Exiled.API.Interfaces;
using Server = Exiled.Events.Handlers.Server;
namespace RoundlockPlugin
{
public class RoundlockPlugin : Plugin<Config>
{
public static RoundlockPlugin Instance;
public override string Name => "RoundlockPlugin";
public override string Author => "thecroshel";
public override string Prefix => "roundlock_plugin";
public override Version Version => new Version(1, 0, 0);
public override Version RequiredExiledVersion => new Version(8, 4, 3);
public override void OnEnabled()
{
Instance = this;
Server.RoundStarted += OnRoundStarted;
base.OnEnabled();
Log.Info("RoundlockPlugin enabled.");
}
public override void OnDisabled()
{
Server.RoundStarted -= OnRoundStarted;
base.OnDisabled();
Log.Info("RoundlockPlugin disabled.");
}
private void OnRoundStarted()
{
Round.IsLocked = true;
Log.Info("Roundlock activated.");
}
}
public class Config : IConfig
{
public bool IsEnabled { get; set; } = true;
public bool Debug { get; set; } = false;
}
}