SteamWar/SpigotCore
Archiviert
13
0

Sort SchematicTypes
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2021-12-02 14:34:29 +01:00
Ursprung a86ee53e2c
Commit 211bda39dc

Datei anzeigen

@ -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;