Merge branch 'master' into permissions-devel
This commit is contained in:
commit
081692e7df
1 changed files with 14 additions and 1 deletions
|
|
@ -123,14 +123,26 @@ namespace TShockAPI
|
||||||
NetHooks.OnGreetPlayer += new NetHooks.GreetPlayerD(OnGreetPlayer);
|
NetHooks.OnGreetPlayer += new NetHooks.GreetPlayerD(OnGreetPlayer);
|
||||||
NpcHooks.OnStrikeNpc += new NpcHooks.StrikeNpcD(NpcHooks_OnStrikeNpc);
|
NpcHooks.OnStrikeNpc += new NpcHooks.StrikeNpcD(NpcHooks_OnStrikeNpc);
|
||||||
ServerHooks.OnCommand += new ServerHooks.CommandD(ServerHooks_OnCommand);
|
ServerHooks.OnCommand += new ServerHooks.CommandD(ServerHooks_OnCommand);
|
||||||
|
|
||||||
|
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||||
|
|
||||||
Log.Info("Hooks initialized");
|
Log.Info("Hooks initialized");
|
||||||
Commands.InitCommands();
|
Commands.InitCommands();
|
||||||
Log.Info("Commands initialized");
|
Log.Info("Commands initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||||
|
{
|
||||||
|
if (Main.worldPathName != null)
|
||||||
|
{
|
||||||
|
Main.worldPathName += ".crash";
|
||||||
|
WorldGen.saveWorld();
|
||||||
|
}
|
||||||
|
Log.Error(e.ExceptionObject.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
void ServerHooks_OnCommand(string cmd, HandledEventArgs e)
|
void ServerHooks_OnCommand(string cmd, HandledEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DeInitialize()
|
public override void DeInitialize()
|
||||||
|
|
@ -733,6 +745,7 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
public float X;
|
public float X;
|
||||||
public float Y;
|
public float Y;
|
||||||
|
|
||||||
public Position(float x, float y) { X = x; Y = y; }
|
public Position(float x, float y) { X = x; Y = y; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue