Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
fix: Simplify add ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
K4ryuu committed May 11, 2024
1 parent c5dd9c2 commit 4891cfd
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions K4-System/src/Plugin/PluginBasics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,31 @@ public void Initialize_Commands()
{
string rankLocale = Localizer["k4.general.availablecommands.rank"];
commandCategories[rankLocale] = new List<string>();
commandCategories[rankLocale].AddRange(commands.RankCommands);
commandCategories[rankLocale].AddRange(commands.TopCommands);
commandCategories[rankLocale].AddRange(commands.RanksCommands);
commandCategories[rankLocale] =
[
.. commands.RankCommands,
.. commands.TopCommands,
.. commands.RanksCommands,
];
}
if (Config.GeneralSettings.ModuleStats)
{
string statLocale = Localizer["k4.general.availablecommands.stat"];
commandCategories[statLocale] = new List<string>();
commandCategories[statLocale].AddRange(commands.StatCommands);
commandCategories[statLocale] = [.. commands.StatCommands];
}
if (Config.GeneralSettings.ModuleTimes)
{
string timeLocale = Localizer["k4.general.availablecommands.time"];
commandCategories[timeLocale] = new List<string>();
commandCategories[timeLocale].AddRange(commands.TimeCommands);
commandCategories[timeLocale] = [.. commands.TimeCommands];
}
string otherLocale = Localizer["k4.general.availablecommands.other"];
commandCategories[otherLocale] = new List<string>();
commandCategories[otherLocale].AddRange(commands.ResetMyCommands);
commandCategories[otherLocale] = [.. commands.ResetMyCommands];
if (Config.GeneralSettings.ModuleUtils)
commandCategories[otherLocale].AddRange(commands.AdminListCommands);
Expand Down

0 comments on commit 4891cfd

Please sign in to comment.