Fixed exception in commands crashing the server
Removed Tools.WriteError using Log.Error instead.
This commit is contained in:
parent
8d13023dac
commit
1ea6d2e955
5 changed files with 31 additions and 34 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue