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(); private StringBuilder current = new StringBuilder();
@Override @Override
public void write(int b) { public void write(int b) throws IOException {
if (b == '\n') { if (b == '\n') {
String logging = current.toString(); String logging = current.toString();
if (logging.contains("SLF4J")) { if (logging.contains("SLF4J")) {

Datei anzeigen

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