Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Other plug-ins cannot call the. #458

Closed
mojiansheng opened this issue Apr 11, 2021 · 7 comments
Closed

Other plug-ins cannot call the. #458

mojiansheng opened this issue Apr 11, 2021 · 7 comments

Comments

@mojiansheng
Copy link

What is the issue/bug you're experiencing?
Other plug-ins cannot call the.
How can the issue be reproduced?
Add AdvancedAchievements
TNE version?
version: 0.1.1.12
TNE build?
version: 0.1.1.12
Modules Loaded?
No Modules
Spigot/Bukkit version?
paper1.16.5 build 550
Is your server run in online mode?
No.I'm BC.

error_info:
[16:31:22 INFO]: [AdvancedAchievements] Enabling AdvancedAchievements v7.0.3
[16:31:22 INFO]: [AdvancedAchievements] Backing up and loading configuration files...
[16:31:23 ERROR]: Error occurred while enabling AdvancedAchievements v7.0.3 (Is it up to date?)
java.lang.NullPointerException: null
at net.tnemc.core.common.api.Economy_TheNewEconomy.currencyNameSingular(Economy_TheNewEconomy.java:65) ~[?:?]
at com.hm.achievement.config.RewardParser.parseMoneyReward(RewardParser.java:109) ~[?:?]
at com.hm.achievement.config.RewardParser.parseRewards(RewardParser.java:86) ~[?:?]
at com.hm.achievement.config.ConfigurationParser.parseAchievement(ConfigurationParser.java:374) ~[?:?]
at com.hm.achievement.config.ConfigurationParser.parseAchievements(ConfigurationParser.java:322) ~[?:?]
at com.hm.achievement.config.ConfigurationParser.loadAndParseConfiguration(ConfigurationParser.java:91) ~[?:?]
at com.hm.achievement.lifecycle.PluginLoader.loadAdvancedAchievements(PluginLoader.java:142) ~[?:?]
at com.hm.achievement.AdvancedAchievements.onEnable(AdvancedAchievements.java:49) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[Paper.jar:git-Paper-550]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[Paper.jar:git-Paper-550]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[Paper.jar:git-Paper-550]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501) ~[Paper.jar:git-Paper-550]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415) ~[Paper.jar:git-Paper-550]
at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:468) ~[Paper.jar:git-Paper-550]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:241) ~[Paper.jar:git-Paper-550]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:943) ~[Paper.jar:git-Paper-550]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[Paper.jar:git-Paper-550]
at java.lang.Thread.run(Thread.java:834) [?:?]
[16:31:23 INFO]: [AdvancedAchievements] Disabling AdvancedAchievements v7.0.3

@mojiansheng
Copy link
Author

@PyvesB
Copy link

PyvesB commented Apr 11, 2021

This is pretty much the same problem as with #108. However, unlike BiomeFinder, which was missing the Vault dependency declaration in its plugin.yml at the time, Advanced Achievements does have this correctly set up. As far as I remember, there have been no reports of other economy plugins erroring in this way with Advanced Achievements over the years, there isn't much I can think of on my side. Any chance you could take a look on what might be going wrong on the New Economy side?

@creatorfromhell
Copy link
Member

What is the issue/bug you're experiencing?
Other plug-ins cannot call the.
How can the issue be reproduced?
Add AdvancedAchievements
TNE version?
version: 0.1.1.12
TNE build?
version: 0.1.1.12
Modules Loaded?
No Modules
Spigot/Bukkit version?
paper1.16.5 build 550
Is your server run in online mode?
No.I'm BC.

error_info:
[16:31:22 INFO]: [AdvancedAchievements] Enabling AdvancedAchievements v7.0.3
[16:31:22 INFO]: [AdvancedAchievements] Backing up and loading configuration files...
[16:31:23 ERROR]: Error occurred while enabling AdvancedAchievements v7.0.3 (Is it up to date?)
java.lang.NullPointerException: null
at net.tnemc.core.common.api.Economy_TheNewEconomy.currencyNameSingular(Economy_TheNewEconomy.java:65) ~[?:?]
at com.hm.achievement.config.RewardParser.parseMoneyReward(RewardParser.java:109) ~[?:?]
at com.hm.achievement.config.RewardParser.parseRewards(RewardParser.java:86) ~[?:?]
at com.hm.achievement.config.ConfigurationParser.parseAchievement(ConfigurationParser.java:374) ~[?:?]
at com.hm.achievement.config.ConfigurationParser.parseAchievements(ConfigurationParser.java:322) ~[?:?]
at com.hm.achievement.config.ConfigurationParser.loadAndParseConfiguration(ConfigurationParser.java:91) ~[?:?]
at com.hm.achievement.lifecycle.PluginLoader.loadAdvancedAchievements(PluginLoader.java:142) ~[?:?]
at com.hm.achievement.AdvancedAchievements.onEnable(AdvancedAchievements.java:49) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[Paper.jar:git-Paper-550]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[Paper.jar:git-Paper-550]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[Paper.jar:git-Paper-550]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501) ~[Paper.jar:git-Paper-550]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415) ~[Paper.jar:git-Paper-550]
at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:468) ~[Paper.jar:git-Paper-550]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:241) ~[Paper.jar:git-Paper-550]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:943) ~[Paper.jar:git-Paper-550]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[Paper.jar:git-Paper-550]
at java.lang.Thread.run(Thread.java:834) [?:?]
[16:31:23 INFO]: [AdvancedAchievements] Disabling AdvancedAchievements v7.0.3

What is your config.yml?

@creatorfromhell
Copy link
Member

This is pretty much the same problem as with #108. However, unlike BiomeFinder, which was missing the Vault dependency declaration in its plugin.yml at the time, Advanced Achievements does have this correctly set up. As far as I remember, there have been no reports of other economy plugins erroring in this way with Advanced Achievements over the years, there isn't much I can think of on my side. Any chance you could take a look on what might be going wrong on the New Economy side?

Looking at the error is most likely due to a configuration issue as it errors looking for a currency name.

@PyvesB
Copy link

PyvesB commented May 1, 2021

Out of fascination, I launched a clean server with Advanced Achievements, Vault and TNE all with default configs, and unfortunately I'm observing the exact same error. Digging a little deeper, I noticed that TNE had a softdepend on Advanced Achievements:

softdepend: [AdvancedAchievements, NoteBlockAPI, WorldEdit, CMI, WorldGuard, FastAsyncWorldEdit, PlaceholderAPI, Vault, Reserve, Towny, mcMMO, GUIShop, DiscordSRV, Multiverse-Core]

This means that the economy plugin will always be loaded after Advanced Achievements, even though Advanced Achievements correctly depends on the Vault economy abstraction.

@creatorfromhell why does TNE need to depend on Advanced Achievements? The dependence was added in a35b9b4, Fix dumb mistake., I'm not seeing anything that could explain why this was done.

@creatorfromhell
Copy link
Member

Out of fascination, I launched a clean server with Advanced Achievements, Vault and TNE all with default configs, and unfortunately I'm observing the exact same error. Digging a little deeper, I noticed that TNE had a softdepend on Advanced Achievements:

softdepend: [AdvancedAchievements, NoteBlockAPI, WorldEdit, CMI, WorldGuard, FastAsyncWorldEdit, PlaceholderAPI, Vault, Reserve, Towny, mcMMO, GUIShop, DiscordSRV, Multiverse-Core]

This means that the economy plugin will always be loaded after Advanced Achievements, even though Advanced Achievements correctly depends on the Vault economy abstraction.

@creatorfromhell why does TNE need to depend on Advanced Achievements? The dependence was added in a35b9b4, Fix dumb mistake., I'm not seeing anything that could explain why this was done.

I'm not sure why it depends on it, but I'm sure it was added for a reason due to a previous issue. I'll test this more later but judging by the error it seems more relating to configurations.

@MetaverseRPN
Copy link

Just an FYI, this seems to still be an issue in TNE 0.1.1.13. Server latest is here: https://gist.github.com/nacjm/350970f757c34d2b76325e4447d725cc

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants