MilkBowl / VaultAPI

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

Need help with implementing vault #141

Closed Chaoshero5567 closed 2 years ago

Chaoshero5567 commented 2 years ago

Hello, i am currently trieng to implement vaulkt support to my econmy system, but i am confused over how, i read trough the documentation and the example, but i am still having some issues, can someone help me with that, for me currently the most easy way seems getting the econmy class and then updating it trough there in my methods, but do i check balance updates then, is there something i may have overseen

Chaoshero5567 commented 2 years ago

image this is how i am doing it after how its most easy for me as a refrance

czmdav commented 2 years ago

Hi, If you do it the way as in the previous image, you are using Vault to deposit money. But, if your plugin is the only economy plugin, than it won't do anything.

I suppose what you want to do is, when someone is given money, or buys something, (through Vault), your plugin should know about the change, to update the balance of players. You need to implement an instance of the Economy class, and register it when your plugin enables, and unregister when your plugin disables. See more details on this Spigot Forum Thread.

Chaoshero5567 commented 2 years ago

Ok i will look into that

cerealcable commented 2 years ago

Closing this issue because of inactivity.