Fixed a missing word in the welcome plugin

This commit is contained in:
RaidMax 2017-06-18 21:22:50 -05:00
parent 622a0a8ddc
commit 4f6fb04563
2 changed files with 7 additions and 4 deletions

View File

@ -124,7 +124,7 @@ namespace Welcome_Plugin
if (newPlayer.Level >= Player.Permission.Trusted && !E.Origin.Masked)
await E.Owner.Broadcast(Utilities.ConvertLevelToColor(newPlayer.Level) + " ^5" + newPlayer.Name + " ^7has joined the server.");
await newPlayer.Tell($"Welcome ^5{newPlayer.Name}^7, this your ^5{TimesConnected(newPlayer)} ^7time connecting!");
await newPlayer.Tell($"Welcome ^5{newPlayer.Name}^7, this is your ^5{TimesConnected(newPlayer)} ^7time connecting!");
if (newPlayer.Level == Player.Permission.Flagged)
await E.Owner.ToAdmins($"^1NOTICE: ^7Flagged player ^5{newPlayer.Name}^7 has joined!");

View File

@ -284,11 +284,14 @@ namespace SharedLibrary.Commands
if (newPerm > Player.Permission.Banned)
{
var ActiveClient = E.Owner.Manager.GetActiveClients().First(p => p.NetworkID == E.Target.NetworkID);
var ActiveClient = E.Owner.Manager.GetActiveClients().FirstOrDefault(p => p.NetworkID == E.Target.NetworkID);
ActiveClient?.SetLevel(newPerm);
await ActiveClient?.Tell("Congratulations! You have been promoted to ^3" + newPerm);
await E.Origin.Tell($"{E.Target.Name} was successfully promoted!");
if (ActiveClient != null)
{
await ActiveClient?.Tell("Congratulations! You have been promoted to ^3" + newPerm);
await E.Origin.Tell($"{E.Target.Name} was successfully promoted!");
}
E.Target.SetLevel(newPerm);
E.Owner.Manager.GetClientDatabase().UpdatePlayer(E.Target);