From 3fd7d429aa5b1b84360aadc19da53b1d6644b08f Mon Sep 17 00:00:00 2001 From: B3none Date: Sat, 27 Jul 2024 22:15:37 +0100 Subject: [PATCH] Organise map config paths alphabetically --- RetakesPlugin/RetakesPlugin.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RetakesPlugin/RetakesPlugin.cs b/RetakesPlugin/RetakesPlugin.cs index a7ae6c7..0db2c02 100644 --- a/RetakesPlugin/RetakesPlugin.cs +++ b/RetakesPlugin/RetakesPlugin.cs @@ -152,6 +152,9 @@ public void OnCommandMapConfigs(CCSPlayerController? player, CommandInfo command var files = Directory.GetFiles(mapConfigDirectory); + // organise files alphabetically + Array.Sort(files); + if (!Directory.Exists(mapConfigDirectory) || files.Length == 0) { commandInfo.ReplyToCommand($"{MessagePrefix}No map configs found.");