-
Notifications
You must be signed in to change notification settings - Fork 1
/
EventManager.cs
34 lines (31 loc) · 917 Bytes
/
EventManager.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
using TerrariaApi.Server;
using TShockTutorials.Events;
using TShockTutorials.Models;
namespace TShockTutorials
{
public class EventManager
{
#region Events
public static OnChestOpen OnChestOpen = new();
public static OnDropLoot OnDropLoot = new();
public static OnPlayerDisconnect OnPlayerDisconnect = new();
public static OnPlayerLogin OnPlayerLogin = new();
public static OnServerReload OnServerReload = new();
#endregion
public static List<Event> Events = new List<Event>()
{
OnChestOpen,
OnDropLoot,
OnPlayerDisconnect,
OnPlayerLogin,
OnServerReload,
};
public static void RegisterAll(TerrariaPlugin plugin)
{
foreach(Event _event in Events)
{
_event.Enable(plugin);
}
}
}
}