diff --git a/gradle.properties b/gradle.properties index c663c99..8ae3ead 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,5 +2,5 @@ name=EconomyLite owner=Flibio inceptionYear=2015 currentYear=2017 -version=2.11.0 +version=2.11.1 apiVersion=5.0.0-SNAPSHOT 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 18ee9bb..0df4f79 100644 --- a/src/main/java/io/github/flibio/economylite/commands/MigrateCommand.java +++ b/src/main/java/io/github/flibio/economylite/commands/MigrateCommand.java @@ -130,12 +130,16 @@ public void run(CommandSource src, CommandContext args) { root.getChildrenMap().keySet().forEach(raw -> { if (raw instanceof String) { String uuid = (String) raw; - ConfigurationNode sub = root.getNode(uuid).getNode("dollar-balance"); - if (!sub.isVirtual()) { - playerService.setBalance(UUID.fromString(uuid), BigDecimal.valueOf(sub.getDouble()), - EconomyLite.getEconomyService().getDefaultCurrency(), CauseFactory.create("Migration")); - logger.debug(uuid.toString() + ": " + sub.getDouble()); - } + root.getNode(uuid).getChildrenMap().keySet().forEach(n -> { + if (n.toString().contains("balance")) { + ConfigurationNode sub = root.getNode(uuid).getNode(n.toString()); + if (!sub.isVirtual()) { + playerService.setBalance(UUID.fromString(uuid), BigDecimal.valueOf(sub.getDouble()), + EconomyLite.getEconomyService().getDefaultCurrency(), CauseFactory.create("Migration")); + logger.debug(uuid.toString() + ":migrate: " + sub.getDouble()); + } + } + }); } }); src.sendMessage(messageStorage.getMessage("command.migrate.completed"));