From 4bdead92b520ef2a02ed3c63d526db7dc48a9ba1 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 9 Apr 2022 21:30:52 +0200 Subject: [PATCH] Update some stuff --- src/de/steamwar/bungeecore/sql/Fight.java | 2 +- src/de/steamwar/bungeecore/sql/Replay.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/sql/Fight.java b/src/de/steamwar/bungeecore/sql/Fight.java index e17dcbfd..4fd0b7d9 100644 --- a/src/de/steamwar/bungeecore/sql/Fight.java +++ b/src/de/steamwar/bungeecore/sql/Fight.java @@ -116,6 +116,6 @@ public class Fight { } public boolean replayExists() { - return Replay.hasReplay(fightID) && getGameMode() != null; + return getGameMode() != null && Replay.hasReplay(fightID); } } diff --git a/src/de/steamwar/bungeecore/sql/Replay.java b/src/de/steamwar/bungeecore/sql/Replay.java index 6c0bab2c..188232a8 100644 --- a/src/de/steamwar/bungeecore/sql/Replay.java +++ b/src/de/steamwar/bungeecore/sql/Replay.java @@ -23,7 +23,7 @@ import java.sql.ResultSet; public class Replay { - private static final Statement hasReplay = new Statement("SELECT * FROM Replay WHERE id = ?"); + private static final Statement hasReplay = new Statement("SELECT FightID FROM Replay WHERE FightID = ?"); public static boolean hasReplay(int id) { return hasReplay.select(ResultSet::next, id);