@@ -148,7 +148,7 @@ public String getDiscordIDFromMinecraft(String uuid) {
148
148
// Return the first result.
149
149
while (result .next ()) {
150
150
String id = result .getString (1 );
151
- statement .close ();
151
+ statement .getConnection (). close ();
152
152
return id ;
153
153
}
154
154
@@ -181,7 +181,7 @@ public String getUuidFromDiscordId(String discordID) {
181
181
182
182
if (result .next ()) {
183
183
String uuid = result .getString (1 );
184
- statement .close ();
184
+ statement .getConnection (). close ();
185
185
186
186
// BetterWhitelistBungee.getInstance().getLogger().info("Got '" + uuid + "' for
187
187
// ID '" + discordID + "'.");
@@ -213,7 +213,7 @@ public boolean addEntry(String discordID, String uuid) {
213
213
Statement statement = createStatement ();
214
214
statement .executeUpdate ("INSERT IGNORE INTO `minecraft_whitelist` (`discordID`, `minecraft_uuid`) VALUES ('"
215
215
+ discordID + "','" + uuid + "');" );
216
- statement .close ();
216
+ statement .getConnection (). close ();
217
217
218
218
getLogger ().info ("Added whitelist entry: '" + discordID + "' => '" + uuid + "'" );
219
219
@@ -246,7 +246,7 @@ public boolean removeEntry(String discordID) {
246
246
try {
247
247
Statement statement = createStatement ();
248
248
statement .executeUpdate ("DELETE FROM `minecraft_whitelist` WHERE `discordID`='" + discordID + "'" );
249
- statement .close ();
249
+ statement .getConnection (). close ();
250
250
251
251
getLogger ().info ("Removed whitelist entry: '" + discordID + "'" );
252
252
@@ -273,7 +273,7 @@ public boolean removeEntryUsingUuid(String uuid) {
273
273
try {
274
274
Statement statement = createStatement ();
275
275
statement .executeUpdate ("DELETE FROM `minecraft_whitelist` WHERE `minecraft_uuid`='" + uuid + "'" );
276
- statement .close ();
276
+ statement .getConnection (). close ();
277
277
return true ;
278
278
}
279
279
0 commit comments