diff --git a/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java b/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java index 6914f4c..5fe5715 100644 --- a/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java +++ b/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java @@ -24,6 +24,7 @@ import org.bukkit.configuration.file.YamlConfiguration; import java.io.File; import java.util.*; +import java.util.stream.Collectors; public class SchematicType { public static final SchematicType Normal = new SchematicType("Normal", "", Type.NORMAL, null); //Has to stay publicly availible @@ -41,7 +42,7 @@ public class SchematicType { tmpFromDB.put(Normal.name().toLowerCase(), Normal); if(folder.exists()) { - 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())) { YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile); if(!config.isConfigurationSection("Schematic")) continue;