Vault

Vault

7M Downloads

Plz add a method for deleting PlayerAccount

Kiwz opened this issue ยท 8 comments

commented

Plz add a method for deleting PlayerAccount, Like there is for BankAccount.
It is highly needed when using Towny.
(Money Accounts generated by towny isnt deleted when the town/nation is deleted or renamed)
http://code.google.com/a/eclipselabs.org/p/towny/issues/detail?id=1448
Thanks :)

commented

Didn't see the part about Towny when I posted. This issue can be resolved on Towny's end if they zeroed the balance upon disbanding. What you are suggesting, on the other hand, requires not just a change to Vault, but for a dozen plugins to provide a method for Vault to implement (deleting player accounts, Vault already has a method for deleting banks).

commented

Maybe the issue is just for me, but zeroing out the accounts isnt enough.
All my players and all new towns/nations starts with an amount (500 dollars).
If a player makes a town called "norway" and then deletes it, the account remains but it has 0 dollar (towny is zeroing it out and not deleting it).
When a new player creates his new town and decides to call it for "norway", he will be mad at me cuz his town didnt start with 500 dollars.
This is why I am so badly interested in this method, back in the dayes when I used Register, this wasnt a problem.
Now I use CraftConomy3 and Register wasent compatible with CraftConomy3 and Towny.

commented

btw, why does a dosen of other plugins need to implement this method in theyr plugin?
They could implement it, but they dont need to, or am I missing something?
The only other plugin I would like this to be implemented for is Towny, and I guess they will do it if you add the possibility.

commented

because if a plugin calls delete there's no gaurantee it will do anything if the economy plugin has no delete method. Thus, this method isn't practical.

commented

Isnt that a problem for the economy plugin?
I thought every economy plugin had a account delete method, I've used /money delete accountname before from a few economy plugins.
I dont get why a "bridge-plugin" couldnt implement this.
Anyway, thanks for the answer.

commented

Vault calls methods from the individual plugins, so they must exist in the economy plugin before Vault can call it. While an economy plugin could return that it has no such feature, plugin developers who become reliant on such a redundant method would create a demand. It is true that some economy plugins already allow this, but because it is not absolutely necessary, many of them don't provide an external way of doing this.

I think I better understand what your (highly circumstantial) issue is, though. It sounds like you are relying on an unintentional "feature" of Towny creating player accounts and your economy plugin of choice's default balance setting. If you request Towny to implement a configurable starting balance, they could provide a much better solution.

commented

Thank you for a much better answer, I will consider to ask Towny if they could add a default balance setting for new towns/nations.

commented

It what situation would a method like that be needed over zeroing a balance? Pruning old accounts sounds like a job better left to the individual plugins than through a plugin utilizing Vault.