Replace Loader with java.nio.files

This commit is contained in:
Astrash
2023-11-25 12:37:56 +11:00
parent ffb1198da2
commit 5c7441241c
22 changed files with 186 additions and 442 deletions

View File

@@ -27,6 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
@@ -64,7 +65,12 @@ public class PlatformImpl extends AbstractPlatform {
public boolean reload() {
getTerraConfig().load(this);
getRawConfigRegistry().clear();
boolean succeed = getRawConfigRegistry().loadAll(this);
boolean succeed = true;
try {
getRawConfigRegistry().loadAll(this);
} catch(IOException e) {
succeed = false;
}
Bukkit.getWorlds().forEach(world -> {
if(world.getGenerator() instanceof BukkitChunkGeneratorWrapper wrapper) {