-
Notifications
You must be signed in to change notification settings - Fork 0
/
FlashbangGun.cs
35 lines (28 loc) · 1014 Bytes
/
FlashbangGun.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
using Exiled.API.Features;
using System;
using Player = Exiled.Events.Handlers.Player;
namespace FlashbangGun
{
public class FlashbangGun : Plugin<FlashbangGunConfig>
{
public override string Name => "FlashbangGun";
public override string Author => "thecroshel";
public override string Prefix => "flashgun";
public override Version Version => new Version(1, 0, 0);
public override Version RequiredExiledVersion => new Version(8, 9, 11);
private EventHandlers _eventHandlers;
public override void OnEnabled()
{
if (!Config.IsEnabled) return;
_eventHandlers = new EventHandlers(this);
Player.Shooting += _eventHandlers.OnShooting;
base.OnEnabled();
}
public override void OnDisabled()
{
Player.Shooting -= _eventHandlers.OnShooting;
_eventHandlers = null;
base.OnDisabled();
}
}
}