Comments (3)
the number of plugins doesn't effect Vault. You shouldn't be checking the economy enabled status unless you're absolutely certain your plugin loads after your economy. I imagine that it's failing because it thinks your econ is disabled when it loads your plugin.
from vault.
ok thank you very much :)) SOLVED
from vault.
well the problem is that you are just checking for the provider once... it is a little bit more complicated like that (at least for me).
I use a boolean to signal that an economy provider was found and than check in my code if that is set before I do stuff...
if (checkVault != null && !plugin.isEconomyEnabled()) {
plugin.setVaultFound(true);
mainLogger.info("Vault detected");
mainLogger.info("Checking economy providers now!");
}
if (plugin.isVaultFound() && !plugin.isEconomyEnabled()) {
RegisteredServiceProvider<Economy> economyProvider = plugin.getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class);
if (economyProvider != null) {
plugin.setEconomy(economyProvider.getProvider());
plugin.setEconomyEnabled(true);
mainLogger.info("Economy provider found: " + economyProvider.getProvider().getName());
if (mainConfig.isEnableGetPayed()) {
mainConfig.setGetPayedActive(true);
mainLogger.info("Activating GetPayed!");
}
} else {
if (missingEconomyWarn) {
mainLogger.warning("No economy provider found.");
mainLogger.info("Still waiting for economy provider to show up.");
missingEconomyWarn = false;
}
}
}
from vault.
Related Issues (20)
- Update the plugin plz to 1.18.2 HOT 8
- HOST ERROR? HOT 11
- Economy Provider issue HOT 2
- Economy provider issue HOT 1
- Small Feature Request HOT 1
- Permission System Request (CloudNet -> CloudPerms) HOT 2
- Server goes offline every time vault checks for updates HOT 3
- Vault Big Error HOT 6
- Please update to 1.19.x HOT 19
- Please support database to optimize performance HOT 2
- Support Folia HOT 4
- I want to include your plugin on my website HOT 1
- I am not able to increase my balance via /pay command HOT 1
- Please update to 1.20.x HOT 15
- Vault MVC Issue 1.20.x HOT 1
- Plugin already init HOT 3
- Economy got wiped? HOT 6
- Chicken egg now spawning babys HOT 1
- The latest version Vault1.7.3 has issues with papermc1.20.4 HOT 1
- Add support for Folia (Multi-thread Paper Fork)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vault.