Fixed a missing word in the welcome plugin
This commit is contained in:
parent
622a0a8ddc
commit
4f6fb04563
@ -124,7 +124,7 @@ namespace Welcome_Plugin
|
|||||||
if (newPlayer.Level >= Player.Permission.Trusted && !E.Origin.Masked)
|
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 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)
|
if (newPlayer.Level == Player.Permission.Flagged)
|
||||||
await E.Owner.ToAdmins($"^1NOTICE: ^7Flagged player ^5{newPlayer.Name}^7 has joined!");
|
await E.Owner.ToAdmins($"^1NOTICE: ^7Flagged player ^5{newPlayer.Name}^7 has joined!");
|
||||||
|
@ -284,11 +284,14 @@ namespace SharedLibrary.Commands
|
|||||||
|
|
||||||
if (newPerm > Player.Permission.Banned)
|
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);
|
ActiveClient?.SetLevel(newPerm);
|
||||||
|
|
||||||
|
if (ActiveClient != null)
|
||||||
|
{
|
||||||
await ActiveClient?.Tell("Congratulations! You have been promoted to ^3" + newPerm);
|
await ActiveClient?.Tell("Congratulations! You have been promoted to ^3" + newPerm);
|
||||||
await E.Origin.Tell($"{E.Target.Name} was successfully promoted!");
|
await E.Origin.Tell($"{E.Target.Name} was successfully promoted!");
|
||||||
|
}
|
||||||
|
|
||||||
E.Target.SetLevel(newPerm);
|
E.Target.SetLevel(newPerm);
|
||||||
E.Owner.Manager.GetClientDatabase().UpdatePlayer(E.Target);
|
E.Owner.Manager.GetClientDatabase().UpdatePlayer(E.Target);
|
||||||
|
Loading…
Reference in New Issue
Block a user