From bd3b50eb4e38b1d5864d84ff208c8f77b02b2803 Mon Sep 17 00:00:00 2001 From: Flibio Date: Sun, 25 Feb 2018 08:24:48 -0700 Subject: [PATCH] Removed EconomyLite 1.0.0 migration --- .../economylite/commands/MigrateCommand.java | 42 +------------------ 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/src/main/java/io/github/flibio/economylite/commands/MigrateCommand.java b/src/main/java/io/github/flibio/economylite/commands/MigrateCommand.java index 63966d4..9a06da2 100644 --- a/src/main/java/io/github/flibio/economylite/commands/MigrateCommand.java +++ b/src/main/java/io/github/flibio/economylite/commands/MigrateCommand.java @@ -73,47 +73,7 @@ public void run(CommandSource src, CommandContext args) { if (args.getOne("confirm").isPresent() && args.getOne("confirm").get()) { // Attempt to migrate String mode = args.getOne("mode").get(); - if (mode.equalsIgnoreCase("economylite1")) { - // Migrate from EconomyLite 1 - File file = new File("config/EconomyLite/data.conf"); - File bFile = new File("config/EconomyLite/businesses.conf"); - try { - if (file.exists()) { - ConfigurationLoader manager = HoconConfigurationLoader.builder().setFile(file).build(); - ConfigurationNode root = manager.load(); - root.getChildrenMap().keySet().forEach(raw -> { - if (raw instanceof String) { - UUID uuid = UUID.fromString((String) raw); - if (root.getNode(uuid.toString()).getNode("balance") != null) { - int balance = root.getNode(uuid.toString()).getNode("balance").getInt(); - playerService.setBalance(uuid, BigDecimal.valueOf(balance), - EconomyLite.getEconomyService().getDefaultCurrency(), CauseFactory.create("Migration")); - logger.debug(uuid.toString() + ": " + balance); - } - } - }); - } - if (bFile.exists()) { - ConfigurationLoader manager = HoconConfigurationLoader.builder().setFile(bFile).build(); - ConfigurationNode root = manager.load(); - root.getChildrenMap().keySet().forEach(raw -> { - if (raw instanceof String) { - String name = (String) raw; - if (root.getNode(name).getNode("balance") != null) { - int balance = root.getNode(name).getNode("balance").getInt(); - virtualService.setBalance(name, BigDecimal.valueOf(balance), - EconomyLite.getEconomyService().getDefaultCurrency(), CauseFactory.create("Migration")); - logger.debug(name + ": " + balance); - } - } - }); - } - src.sendMessage(messageStorage.getMessage("command.migrate.completed")); - } catch (Exception e) { - logger.error(e.getMessage()); - src.sendMessage(messageStorage.getMessage("command.migrate.fail")); - } - } else if (mode.equalsIgnoreCase("totaleconomy")) { + if (mode.equalsIgnoreCase("totaleconomy")) { try { // Migrate from TotalEconomy String configDir = EconomyLite.getInstance().getMainDir();