EconomyProvider Registry not being Detected
gmitch215 opened this issue ยท 3 comments
Expected behavior
EconomyProvider is registered correctly and viewed
Observed behavior
Linked to Issue #33 on Novaconomy:
@GamerCoder215 I tried to start it up with plugmanX not installed and no change still cannot use commands I took a look in the latest log but I do not see any specific errors I will also note that treasury does not register novaconomy as an economy with this issue as well latest.log
Reproduction steps
- Load Novaconomy Plugin with Treasury Installed
- Novaconomy recognizes Treasury installed, uses Treasury API to register its EconomyProvider
- Treasury should work as usual, however no EconomyProvider is shown.
Stack trace or error log
https://gist.github.com/GamerCoder215/48345f47695e259c3403241d7d80bf18
Treasury information
Unknown
Additional information
Code Used:
// TreasuryRegistry implements EconomyProvider
public TreasuryRegistry(Novaconomy plugin) {
// this.plugin = plugin;
ConfigurationSerialization.registerClass(TreasuryAccount.class);
TreasuryAccount.global = NovaConfig.getGlobalStorage();
TreasuryAccount.treasuryAccounts = TreasuryAccount.global.isConfigurationSection(TREASURY_ACCOUNTS) ? TreasuryAccount.global.getConfigurationSection(TREASURY_ACCOUNTS) : TreasuryAccount.global.createSection(TREASURY_ACCOUNTS);
ServiceRegistry r = ServiceRegistry.INSTANCE;
if (!r.serviceFor(EconomyProvider.class).isPresent()) {
r.registerService(EconomyProvider.class, this, plugin.getName(), ServicePriority.HIGH);
plugin.getLogger().info("Injected Novaconomy EconomyProvider into Treasury");
}
}
More code is available on the Novaconomy Repository.
The crossing out is a visual bug on server consoles where the strikethrough on the arrow seems to continue forwards ๐
I also recommend registering the economy provider regardless if one is present or not - this is why we are using priorities.
Is the issue resolved?
The crossing out is a visual bug on server consoles where the strikethrough on the arrow seems to continue forwards ๐
I also recommend registering the economy provider regardless if one is present or not - this is why we are using priorities.
Is the issue resolved?
I usually check that to make sure I don't register it multiple times (unless that's automatically checked)
His response was:
okay update i figured out why treasury crossed out novaconomy I had treasury (as well on the servers) in bungee but novaconomy only on one server, which wasnt needed so you dont need to look into that
I'll close this as nothing related to Treasury needs further investigation, thanks for the information though.