This repository has been archived by the owner on May 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plugin.cs
63 lines (44 loc) · 1.65 KB
/
Plugin.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using Exiled.Events.Handlers;
using System;
using Teleports.Handlers;
namespace Teleports
{
public sealed class Plugin : Exiled.API.Features.Plugin<Config>
{
private MapHandlers _map;
private PlayerHandlers _player;
private WarheadHandlers _warhead;
public override string Prefix => "Teleports";
public override string Name => "Teleports";
public override string Author => "Timersky & NotAloneAgain";
public override Version Version { get; } = new Version(5, 0, 2);
public override Version RequiredExiledVersion { get; } = new Version(8, 4, 0);
public override void OnEnabled()
{
_map = new();
_player = new();
_warhead = new();
Map.Generated += _map.OnGenerated;
Map.Decontaminating += _map.OnDecontaminating;
Player.ChangingRole += _player.OnChangingRole;
Player.Left += _player.OnLeft;
Warhead.Detonated += _warhead.OnDetonated;
base.OnEnabled();
}
public override void OnDisabled()
{
Warhead.Detonated -= _warhead.OnDetonated;
Player.Left -= _player.OnLeft;
Player.ChangingRole -= _player.OnChangingRole;
Map.Generated -= _map.OnGenerated;
Map.Decontaminating -= _map.OnDecontaminating;
_map = null;
_player = null;
_warhead = null;
base.OnDisabled();
}
public override void OnReloaded() { }
public override void OnRegisteringCommands() { }
public override void OnUnregisteringCommands() { }
}
}