MilkBowl / VaultAPI

API Component of Vault
GNU Lesser General Public License v3.0
274 stars 112 forks source link

Remove deprecated methods from the Economy interface #121

Closed lokka30 closed 3 years ago

lokka30 commented 3 years ago

Methods such as this have been deprecated for quite a while now. More than adequate time has been provided for plugins to use OfflinePlayer methods instead.

Geolykt commented 3 years ago

What would the replacement be for non-player accounts? This would basically brick 98% of such plugins

lokka30 commented 3 years ago

What would the replacement be for non-player accounts? This would basically brick 98% of such plugins

I was under the assumption these methods were purely for player account activity only, where the name variable was meant to be a player's username.

Geolykt commented 3 years ago

In theory that's the case, but most plugins don't adhere to that logic. The Bank API isn't a suitable replacement so I don't blame them.

lokka30 commented 3 years ago

In theory that's the case, but most plugins don't adhere to that logic. The Bank API isn't a suitable replacement so I don't blame them.

If an API is being used incorrectly I believe it does not mean that the maintainers should allow it :) I know Towny is or used to misuse these methods and it caused annoyances for myself when I was developing my old economy plugin. Perhaps Vault can offer alternatives for managing non-player balances? I agree that the Bank API is an unsuitable replacement.

lokka30 commented 3 years ago

I believe it would be much better if Vault had separate non-player-transaction methods, and removed these deprecated methods. Then, economy plugins can deal with Vault methods in a way that doesn't have to band-aid their code because a few plugins decide to misuse it (even though they are perfectly capable of having their own databases).

On a side question, @Geolykt, what ways do you think the Bank API can be improved to become suitable for these types of applications?

lokka30 commented 3 years ago

This will be fixed with #112.