Added event for reloading configs, so when a user does /reload it informs plugins that a config reload is requested.

This commit is contained in:
Zack Piispanen 2013-04-21 19:26:17 -04:00
parent b37552ff27
commit e37ada8749
3 changed files with 34 additions and 2 deletions

View file

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TShockAPI.Hooks
{
public class ReloadEventArgs
{
public TSPlayer Player { get; set; }
public ReloadEventArgs(TSPlayer ply)
{
Player = ply;
}
}
public class GeneralHooks
{
public delegate void ReloadEventD(ReloadEventArgs e);
public static event ReloadEventD ReloadEvent;
public static void OnReloadEvent(TSPlayer ply)
{
if(ReloadEvent == null)
return;
ReloadEvent(new ReloadEventArgs(ply));
}
}
}