mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Restructure connection interfacing system
This commit is contained in:
1 parent
894b50ad0d
commit
7ef9159daf
33 files changed
+200
-256
No files matched your search
@@ -19,9 +19,8 @@ public class TpHereCommand extends CommandBase {
|
||||
protected void onCommand(Player p, Command command, String label, String[] args) {
|
||||
if (args.length == 1) {
|
||||
String targetPlayer = args[0];
|
||||
Connection connection = HuskHomes.getConnection();
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
|
||||
try {
|
||||
try (Connection connection = HuskHomes.getConnection()) {
|
||||
TeleportManager.teleportHere(p, targetPlayer, connection);
|
||||
} catch (SQLException e) {
|
||||
plugin.getLogger().log(Level.SEVERE, "An SQL exception occurred using /tphere");
|
||||
|
||||
Reference in new issue
Block a user