Restructure connection interfacing system

This commit is contained in:
William committed 2021-10-02 23:07:45 +01:00
1 parent 894b50ad0d
commit 7ef9159daf
33 files changed
+200 -256

No files matched your search

@@ -42,7 +42,6 @@ public class EditHomeCommand extends CommandBase implements TabCompleter {
return;
}
Connection connection = HuskHomes.getConnection();
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
String homeName = args[0];
String ownerName = p.getName();
@@ -57,7 +56,7 @@ public class EditHomeCommand extends CommandBase implements TabCompleter {
}
}
try {
try (Connection connection = HuskHomes.getConnection()) {
if (!DataManager.homeExists(ownerName, homeName, connection)) {
if (!ownerName.equalsIgnoreCase(p.getName())) {
MessageManager.sendMessage(p, "error_home_invalid_other", ownerName, homeName);