Vault

Vault

7M Downloads

vault-convert fails to get correct values from EssentialsEconomy

Opened this issue ยท 1 comments

commented

I have been using Essentials Economy and I am upgrading to Fe-Economy so that I have common balance across my servers. When I use the following command:

/vault-convert EssentialsEconomy Fe

It converts all the users but it sets their money column to 100.

To double-check I delete one of the entries by 'name' and then re-run the conversion and the row appears on the fe_accounts table but the balance is 100.

The contents of one of the userdata files from Essentials/userdata is (I changed the uuid and user info and ip address for security reasons):

$ cat plugins/Essentials/userdata/someuser.yml
uuid: 12345678-1234-1234-1234-123456781234
timestamps:
login: 1406589919926
logout: 1406590872011
lastteleport: 1406589742011
ipAddress: 1.1.1.1
lastlocation:
world: CentralHub
x: 452.99224481546656
y: 84.0
z: 368.69999998807907
yaw: 9.462015
pitch: 32.243576
money: '2901.0'
logoutlocation:
world: SomeWorld
x: 200.4611931234641
y: 97.0
z: 264.36460259141097
yaw: -102.00061
pitch: 86.84997
afk: false

So I would expect the row in fe_accounts to get a 'money' of 2901.0 but it is getting 100. Any way to turn on more trace logging to see what's going on?

commented

So Vault only issues 2 commands when it does a conversion for each offline player: econ2.createPlayerAccount(op);
econ2.depositPlayer(op, econ1.getBalance(op));

It only does this when econ1 returns a hasAccount and econ2 returns no account. There may be some odd interaction going on that FeConomy thinks it needs to generate a new account so the conversion is getting skipped. Vault-convert isn't designed to overwrite data in case you've been using the other economy. For cases when you need to completely convert it's suggested to request the new economy to write their own conversion.
Also others have had problems using FEconomy and conversions. I can't fix anything with this as FEConomy has written their own connector.