Merge branch 'general-devel' into patch-35

This commit is contained in:
Chris 2021-08-03 00:46:52 +09:30 committed by GitHub
commit 1ccc5ced8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -1134,6 +1134,11 @@ namespace TShockAPI
TShock.UserAccounts.SetUserGroup(account, args.Parameters[2]);
TShock.Log.ConsoleInfo(args.Player.Name + " changed account " + account.Name + " to group " + args.Parameters[2] + ".");
args.Player.SendSuccessMessage("Account " + account.Name + " has been changed to group " + args.Parameters[2] + "!");
//send message to player with matching account name
var player = TShock.Players.FirstOrDefault(p => p != null && p.Account?.Name == account.Name);
if (player != null && !args.Silent)
player.SendSuccessMessage($"{args.Player.Name} has changed your group to {args.Parameters[2]}");
}
catch (GroupNotExistsException)
{