From 1711056844768fade51d7efe815b98de3505074c Mon Sep 17 00:00:00 2001 From: Zrips Date: Thu, 26 May 2022 16:01:19 +0300 Subject: [PATCH] Fixing convert command feedback message --- .../gamingmesh/jobs/commands/list/convert.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/convert.java b/src/main/java/com/gamingmesh/jobs/commands/list/convert.java index 6e1a4b0e..978d7ebc 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/convert.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/convert.java @@ -22,17 +22,13 @@ public class convert implements Cmd { return true; } - Bukkit.getScheduler().runTaskAsynchronously(plugin, Jobs::convertDatabase); + String from = Jobs.getDBManager().getDbType() == DataBaseType.SqLite ? "SQLite" : "MySQL"; + String to = Jobs.getDBManager().getDbType() == DataBaseType.SqLite ? "MySQL" : "SQLite"; - String from = "MySQL"; - String to = "SQLite"; - - if (Jobs.getDBManager().getDbType() != DataBaseType.SqLite) { - from = "SQLite"; - to = "MySQL"; - } - - Jobs.consoleMsg("&eData base was converted from &2" + from + " &eto &2" + to + "&e!"); + Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> { + Jobs.convertDatabase(); + Jobs.consoleMsg("&eDatabase was converted from &2" + from + " &eto &2" + to + "&e!"); + }); return true; }