Closed zxcqirara closed 2 years ago
You need a plugin that registers the economy otherwise this is intended behaviour
You need a plugin that registers the economy otherwise this is intended behaviour
How can I register it?
Read the documentation, it's straightforward enough that most people should be able to do it. If you do not intend to create an economy, use an economy plugin
Documentation? Where is documentation? I found only example & javadocs. Example class returns null
at this line too.
Okay, yeah you are right, not sure where I found this documentation I used ages back ... Anyways, found a snippet on the internet that does what you might need
Bukkit.getServicesManager().register(Economy.class, myEconomyInstance, plugin, ServicePriority.Normal);
That being said, ONLY use this if you actually want to register an economy (as only one plugin should register it), if you do not have an economy, use a dedicated economy plugin
Ok, thx, I'll try this later
@ChA0S-f4me Vault doesn't provide an economy implementation, if you are developing a plugin to use economy features you'll need to install an economy plugin that works with vault when you go to test things.
My code:
Why it returns null & how to fix it? I need to check player's balance
PaperMC 1.18.1-132, localhost, no plugins except mine and Vault 1.7.3-b131