From c0887a87d01a7e3ac8bf565be19aa980f875696f Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 2 Nov 2020 17:23:15 +0100 Subject: [PATCH] Start recording all event fights Signed-off-by: Lixfel --- FightSystem_API/src/de/steamwar/fightsystem/Config.java | 2 +- .../de/steamwar/fightsystem/record/SpectateConnection.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/FightSystem_API/src/de/steamwar/fightsystem/Config.java b/FightSystem_API/src/de/steamwar/fightsystem/Config.java index 1469700..524da67 100644 --- a/FightSystem_API/src/de/steamwar/fightsystem/Config.java +++ b/FightSystem_API/src/de/steamwar/fightsystem/Config.java @@ -413,6 +413,6 @@ public class Config { return CheckSchemID != 0; } public static boolean recording(){ - return event() && SpectateSystem; + return event(); } } diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/record/SpectateConnection.java b/FightSystem_Main/src/de/steamwar/fightsystem/record/SpectateConnection.java index 8db7f20..9951321 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/record/SpectateConnection.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/record/SpectateConnection.java @@ -40,7 +40,8 @@ public class SpectateConnection extends Recorder{ socket.setTcpNoDelay(true); // Don't wait always on ack this.outputStream = new DataOutputStream(new BufferedOutputStream(socket.getOutputStream())); } catch (IOException e) { - Bukkit.getLogger().log(Level.SEVERE, "Could not init connection", e); + Bukkit.getLogger().log(Level.WARNING, "Could not init connection to spectate server", e); + close(); } } @@ -140,7 +141,7 @@ public class SpectateConnection extends Recorder{ socket.close(); outputStream.close(); } catch (IOException e) { - Bukkit.getLogger().log(Level.SEVERE, "IOException on socket close", e); + Bukkit.getLogger().log(Level.WARNING, "IOException on socket close", e); } } }