diff --git a/src/main/java/me/paradoxpixel/themepark/database/Database.java b/src/main/java/me/paradoxpixel/themepark/database/Database.java index 1ab6dc9..9bcb549 100644 --- a/src/main/java/me/paradoxpixel/themepark/database/Database.java +++ b/src/main/java/me/paradoxpixel/themepark/database/Database.java @@ -105,6 +105,9 @@ public class Database { if(!connected()) connect(); + if(!connected()) + return false; + stopPool(); try { PreparedStatement statement = connection.prepareStatement(query); @@ -135,6 +138,9 @@ public class Database { if(!connected()) connect(); + if(!connected()) + return 0; + stopPool(); try { PreparedStatement statement = connection.prepareStatement(query); @@ -165,6 +171,9 @@ public class Database { if(!connected()) connect(); + if(!connected()) + return null; + stopPool(); try { PreparedStatement statement = connection.prepareStatement(query);