Removed created file checks, fixed comparison in world generator.

This commit is contained in:
Fernando Pettinelli 2021-02-06 14:56:13 -03:00 committed by Brianna
parent 4d4bb73e4f
commit 9867ebb09a
2 changed files with 2 additions and 11 deletions

View File

@ -48,17 +48,8 @@ public class FileChecker {
public void compareFiles() {
for (File.Type fileType : File.Type.values()) {
File file = loadedFiles.get(fileType);
FileConfiguration configLoad = file.getFileConfiguration();
if (fileType == File.Type.CREATED) {
File resourceFile = loadedFiles.get(File.Type.RESOURCE);
for (String configKeyList : file.getKeys().keySet()) {
if (!resourceFile.getKeys().containsKey(configKeyList)) {
configLoad.set(configKeyList, null);
}
}
} else if (fileType == File.Type.RESOURCE) {
if (fileType == File.Type.RESOURCE) {
File createdFile = loadedFiles.get(File.Type.CREATED);
FileConfiguration createdConfigLoad = createdFile.getFileConfiguration();

View File

@ -139,7 +139,7 @@ public class WorldManager {
}
private ChunkGenerator getWorldGenerator(String mapName, String worldGeneratorName, IslandWorld islandWorld) {
if (worldGeneratorName == null || worldGeneratorName == "default" || worldGeneratorName.length() == 0) {
if (worldGeneratorName == null || worldGeneratorName.equalsIgnoreCase("default") || worldGeneratorName.length() == 0) {
return new VoidGenerator(islandWorld);
}