From adeb5de0340e2f727d52ce6241fb99d1c5b69c8e Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sun, 10 Oct 2021 08:20:30 +0200 Subject: [PATCH] Fix whois NPE on never connected user Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/sql/SteamwarUser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/sql/SteamwarUser.java b/src/de/steamwar/bungeecore/sql/SteamwarUser.java index 2643d62..0599bc1 100644 --- a/src/de/steamwar/bungeecore/sql/SteamwarUser.java +++ b/src/de/steamwar/bungeecore/sql/SteamwarUser.java @@ -329,7 +329,7 @@ public class SteamwarUser { public double getOnlinetime() { return getPlaytime.select(rs -> { - if(rs.next()) + if(rs.next() && rs.getBigDecimal("Playtime") != null) return rs.getBigDecimal("Playtime").doubleValue(); return 0.0; }, id);