mirror of https://github.com/MilkBowl/Vault.git
fix convert command to take initial balance into account.
This commit is contained in:
parent
cc0e8d5131
commit
18377681e0
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
|||
<!-- Project information -->
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
<artifactId>Vault</artifactId>
|
||||
<version>${api.version}.1</version>
|
||||
<version>${api.version}.2</version>
|
||||
<name>Vault</name>
|
||||
<url>http://dev.bukkit.org/server-mods/vault/</url>
|
||||
<description>Vault is a Permissions & Economy API to allow plugins to more easily hook into these systems without needing to hook each individual system themselves.
|
||||
|
|
|
@ -462,7 +462,13 @@ public class Vault extends JavaPlugin {
|
|||
continue;
|
||||
}
|
||||
econ2.createPlayerAccount(op);
|
||||
econ2.depositPlayer(op, econ1.getBalance(op));
|
||||
double diff = econ1.getBalance(op) - econ2.getBalance(op);
|
||||
if (diff > 0) {
|
||||
econ2.depositPlayer(op, diff);
|
||||
} else if (diff < 0) {
|
||||
econ2.withdrawPlayer(op, -diff);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
sender.sendMessage("Converson complete, please verify the data before using it.");
|
||||
|
|
Loading…
Reference in New Issue