MilkBowl / VaultAPI

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

Service provider return null #118

Closed Galajus closed 3 years ago

Galajus commented 3 years ago

RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);

I'm using guide from readme, in 1.16 work but not in 1.17, java 16 (server and project)

Is other way to implement economy or i must wait to vault update? :c

Geolykt commented 3 years ago

If it returns null it means there is no economy registered (always get that value lazily!) - fixing it at the vault side is not really possible. On the plugin side of things you may want to register a dummy economy instead but it is often unlikely that it is needed

Galajus commented 3 years ago

Thank you, that was problem with my plugin. 🤦