SteamWar/BauSystem2.0
Archiviert
12
0

Fix RegionLoader

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2021-06-26 11:44:50 +02:00
Ursprung 470fe79e3b
Commit 6668f829af
2 geänderte Dateien mit 7 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -91,7 +91,7 @@ public class BauSystem extends JavaPlugin implements Listener {
private StringBuilder current = new StringBuilder();
@Override
public void write(int b) {
public void write(int b) throws IOException {
if (b == '\n') {
String logging = current.toString();
if (logging.contains("SLF4J")) {

Datei anzeigen

@ -66,10 +66,12 @@ public class RegionLoader {
File optionsFile = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "options.yapion");
optionsYapionObject = new YAPIONObject();
try (BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(optionsFile))) {
optionsYapionObject = YAPIONParser.parse(bufferedInputStream);
} catch (IOException e) {
// Ignored
if (optionsFile.length() != 0) {
try (BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(optionsFile))) {
optionsYapionObject = YAPIONParser.parse(bufferedInputStream);
} catch (IOException e) {
// Ignored
}
}
yapionObject.forEach((key, yapionAnyType) -> {