mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +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
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user