1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 23:31:13 -05:00

Refactor MuteManager constructor and clean up code (#329)

The MuteManager constructor within the Mute plugin has been refactored for better dependency injection. This change simplifies the class construction by directly initializing fields in the constructor parameters. Additionally, several minor code improvements have been made, including spelling corrections and replacing some conditional checks for readability. Other arrays or methods in the plugin are also revised for better maintainability and readability of the code.
This commit is contained in:
Amos
2024-06-30 03:50:00 +01:00
committed by GitHub
parent 40f912542b
commit ba633be034
7 changed files with 89 additions and 71 deletions

View File

@ -20,8 +20,8 @@ public class MuteCommand : Command
Permission = EFClient.Permission.Moderator;
RequiresTarget = true;
SupportedGames = Plugin.SupportedGames;
Arguments = new[]
{
Arguments =
[
new CommandArgument
{
Name = translationLookup["COMMANDS_ARGS_PLAYER"],
@ -32,7 +32,7 @@ public class MuteCommand : Command
Name = translationLookup["COMMANDS_ARGS_REASON"],
Required = true
}
};
];
}
public override async Task ExecuteAsync(GameEvent gameEvent)