Change Utils.Reload to not take a player.
There are two occasions in the codebase when Utils.Reload is called and we're competent enough that we can just call the event when the reload happens. Unrelated note, but shouldn't this event be called prior to reloading? I've kept it the same to preserve existing behavior, but I think it should probably happen before the reload event takes place. Either way, I think this is fine.
This commit is contained in:
parent
152c67f27c
commit
afdedee1c4
3 changed files with 5 additions and 4 deletions
|
|
@ -339,7 +339,8 @@ namespace TShockAPI
|
|||
[Token]
|
||||
private object ServerReload(RestRequestArgs args)
|
||||
{
|
||||
TShock.Utils.Reload(new TSRestPlayer(args.TokenData.Username, TShock.Groups.GetGroupByName(args.TokenData.UserGroupName)));
|
||||
TShock.Utils.Reload();
|
||||
Hooks.GeneralHooks.OnReloadEvent(new TSRestPlayer(args.TokenData.Username, TShock.Groups.GetGroupByName(args.TokenData.UserGroupName)));
|
||||
|
||||
return RestResponse("Configuration, permissions, and regions reload complete. Some changes may require a server restart.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue