Fixed exception in commands crashing the server

Removed Tools.WriteError using Log.Error instead.
This commit is contained in:
ricky 2011-06-15 20:54:32 +10:00
parent 8d13023dac
commit 1ea6d2e955
5 changed files with 31 additions and 34 deletions

View file

@ -74,7 +74,15 @@ namespace TShockAPI
if (!ply.Group.HasPermission(permission))
return false;
command(new CommandArgs(msg, ply, parms));
try
{
command(new CommandArgs(msg, ply, parms));
}
catch (Exception e)
{
Log.Error(e.ToString());
}
return true;
}