Adjust connection getting during teleport to fix expired connection error

This commit is contained in:
William committed 2021-11-23 01:53:57 +00:00
1 parent 4e2488399d
commit 9943d2c9d5
11 files changed
+145 -166

No files matched your search

@@ -22,7 +22,7 @@ public class TpHereCommand extends CommandBase {
String targetPlayer = args[0];
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
try (Connection connection = HuskHomes.getConnection()) {
TeleportManager.teleportHere(p, NameAutoCompleter.getAutoCompletedName(targetPlayer), connection);
TeleportManager.teleportHere(p, NameAutoCompleter.getAutoCompletedName(targetPlayer));
} catch (SQLException e) {
plugin.getLogger().log(Level.SEVERE, "An SQL exception occurred using /tphere");
}