Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Fix TotalEconomy migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Flibio committed May 4, 2017
1 parent 2a7cc42 commit 2426e8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 2426e8e

Please sign in to comment.