Added event 'TShock.Initialized' that is called after tshock is initialized.
'Called after TShock is initialized. Useful for plugins that needs hooks before tshock but also depend on tshock being loaded.'
This commit is contained in:
parent
e5a725a513
commit
445a3fd9d8
2 changed files with 9 additions and 4 deletions
|
|
@ -36,5 +36,5 @@ using System.Runtime.InteropServices;
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("3.2.6.0813")]
|
[assembly: AssemblyVersion("3.2.6.0815")]
|
||||||
[assembly: AssemblyFileVersion("3.2.6.0813")]
|
[assembly: AssemblyFileVersion("3.2.6.0815")]
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,7 @@ using System.Data;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Community.CsharpSqlite.SQLiteClient;
|
using Community.CsharpSqlite.SQLiteClient;
|
||||||
|
|
@ -67,6 +65,11 @@ namespace TShockAPI
|
||||||
public static bool OverridePort;
|
public static bool OverridePort;
|
||||||
static PacketBufferer bufferer;
|
static PacketBufferer bufferer;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called after TShock is initialized. Useful for plugins that needs hooks before tshock but also depend on tshock being loaded.
|
||||||
|
/// </summary>
|
||||||
|
public static event Action Initialized;
|
||||||
|
|
||||||
|
|
||||||
public override Version Version
|
public override Version Version
|
||||||
{
|
{
|
||||||
|
|
@ -189,6 +192,8 @@ namespace TShockAPI
|
||||||
Log.ConsoleInfo("AutoSave " + (Config.AutoSave ? "Enabled" : "Disabled"));
|
Log.ConsoleInfo("AutoSave " + (Config.AutoSave ? "Enabled" : "Disabled"));
|
||||||
Log.ConsoleInfo("Backups " + (Backups.Interval > 0 ? "Enabled" : "Disabled"));
|
Log.ConsoleInfo("Backups " + (Backups.Interval > 0 ? "Enabled" : "Disabled"));
|
||||||
|
|
||||||
|
if (Initialized != null)
|
||||||
|
Initialized();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue