From 613d0bd728cc8a05153c0979bd3e9eed5c07aad4 Mon Sep 17 00:00:00 2001 From: Librazy Date: Mon, 2 Jul 2018 12:45:33 +0800 Subject: [PATCH] invert dump direction --- .../java/cat/nyaa/HamsterEcoHelper/CommandHandler.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/cat/nyaa/HamsterEcoHelper/CommandHandler.java b/src/main/java/cat/nyaa/HamsterEcoHelper/CommandHandler.java index 73da535..9b17295 100644 --- a/src/main/java/cat/nyaa/HamsterEcoHelper/CommandHandler.java +++ b/src/main/java/cat/nyaa/HamsterEcoHelper/CommandHandler.java @@ -157,16 +157,16 @@ public void userRetrieve(CommandSender sender, Arguments args) { @SubCommand(value = "dump", permission = "heh.admin") public void databaseDump(CommandSender sender, Arguments args) { - String from = args.next(); - RelationalDB todb = plugin.database.database; - RelationalDB fromdb = DatabaseUtils.get(from).connect(); + String to = args.next(); + RelationalDB todb = DatabaseUtils.get(to).connect(); + RelationalDB fromdb = plugin.database.database; DatabaseUtils.dumpDatabaseAsync(plugin, fromdb, todb, (cls, r) -> { if (cls != null) { - msg(sender, "internal.info.dump.ing", cls.getName(), from, r); + msg(sender, "internal.info.dump.ing", cls.getName(), to, r); } else { fromdb.close(); if(r == 0){ - msg(sender, "internal.info.dump.finished", from); + msg(sender, "internal.info.dump.finished", to); } else { msg(sender, "internal.error.command_exception"); }