Economy provider issue
xhyrom opened this issue ยท 1 comments
I tried example code from README, but it still throws
No economy plugin found!
package x.hyro.m
import net.milkbowl.vault.economy.Economy
import org.bukkit.plugin.java.JavaPlugin
class Main: JavaPlugin() {
var economy: Economy? = null
override fun onEnable() {
println("Hello World!")
println("hm")
if (!setupEconomy()) {
println("No economy plugin found!")
return
}
}
private fun setupEconomy(): Boolean {
if (server.pluginManager.getPlugin("Vault") == null) {
println("Vault not found!")
return false
}
println("vvvvvvvvvv2!")
println(server.servicesManager.getRegistrations(server.pluginManager.getPlugin("vault")!!))
val rsp = server.servicesManager.getRegistration(
Economy::class.java
) ?: return false
println("vvvvvvvvvv3!")
economy = rsp.provider
return true
}
}
See the equally named issue from a few days ago: #905.
If that is not the issue, make sure you have an economy plugin installed