Dieser Commit ist enthalten in:
Ursprung
a86ee53e2c
Commit
211bda39dc
@ -24,6 +24,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class SchematicType {
|
public class SchematicType {
|
||||||
public static final SchematicType Normal = new SchematicType("Normal", "", Type.NORMAL, null); //Has to stay publicly availible
|
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);
|
tmpFromDB.put(Normal.name().toLowerCase(), Normal);
|
||||||
|
|
||||||
if(folder.exists()) {
|
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);
|
YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile);
|
||||||
if(!config.isConfigurationSection("Schematic"))
|
if(!config.isConfigurationSection("Schematic"))
|
||||||
continue;
|
continue;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren