From 9f7eca9689816d2258a71d426fa6019872c24acb Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 2 Dec 2021 09:41:47 +0100 Subject: [PATCH] Display sorted Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/ArenaMode.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/ArenaMode.java b/src/de/steamwar/bungeecore/ArenaMode.java index 81eed30..13db3f4 100644 --- a/src/de/steamwar/bungeecore/ArenaMode.java +++ b/src/de/steamwar/bungeecore/ArenaMode.java @@ -28,6 +28,7 @@ import net.md_5.bungee.config.YamlConfiguration; import java.io.File; import java.io.IOException; import java.util.*; +import java.util.stream.Collectors; public class ArenaMode { @@ -40,7 +41,7 @@ public class ArenaMode { static { File folder = new File(ProxyServer.getInstance().getPluginsFolder(), "FightSystem"); - for(File configFile : folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))) { + for(File configFile : Arrays.stream(folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))).sorted().collect(Collectors.toList())) { Configuration config; try { config = ConfigurationProvider.getProvider(YamlConfiguration.class).load(configFile);