ArcanePlugins / Treasury

🏦 A powerful multi-platform library for next-level plugin integrations.
https://hangar.papermc.io/ArcanePlugins/Treasury
Other
56 stars 13 forks source link

Rewrite the way of accessing accounts #218

Closed MrIvanPlays closed 1 year ago

MrIvanPlays commented 1 year ago

Closes #167

lokka30 commented 1 year ago

I'm thinking we eliminate createIfNotExists entirely and economy providers will implement that logic by standard.

MrIvanPlays commented 1 year ago

I'm thinking we eliminate createIfNotExists entirely and economy providers will implement that logic by standard.

what if i don't want to create an account if it doesn't exist?

lokka30 commented 1 year ago

I'm thinking we eliminate createIfNotExists entirely and economy providers will implement that logic by standard.

what if i don't want to create an account if it doesn't exist?

I don't see the use case. There's hasAccount to check if one exists, and if someone wants to retrieve it, they will use retrieve and it will – assuming no errors – return an account, new or existing, that only matters to the economy provider.