MilkBowl / VaultAPI

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

Problems with Vault #150

Closed Mihanoks closed 1 month ago

Mihanoks commented 1 year ago

I'm new to plugin development and I'm trying to create my first plugin. I have a problem with using economic methods. Please help Code: https://github.com/Mihanoks/WorldBank Error: latest.log

Geolykt commented 1 year ago

A) This is not really a support forum B) That repository does not seem to be public C) Guessing from the error message there are a few possible causes: ~~1. You are programming an economy provider but did not register your economy to vault (or at least not at that point)

  1. You are programming an economy consumer but there is no economy provider present~~
  2. You are programming an economy consumer but all economy providers are loading after your plugin; Consider using the ServiceRegisterEvent to determine the currently active economy instead of the code currently present in the documentation.
Mihanoks commented 1 year ago

Sorry, I forgot to make it public, now the repository is public

Geolykt commented 1 year ago

Yeah then the issue is exactly what I thought it was. You should use the ServiceRegisterEvent to obtain the economy.

Don't ask for examples though, very few plugins actually use that because few know that that event actually exists. And it's a bit harder to implement I guess