Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More reliable Hooking into Plugins #1360

Open
Wolf2323 opened this issue Jan 8, 2021 · 0 comments
Open

More reliable Hooking into Plugins #1360

Wolf2323 opened this issue Jan 8, 2021 · 0 comments
Labels
Bug A bug in the code or in a documentation. Confirmed Something is confimed.

Comments

@Wolf2323
Copy link
Member

Wolf2323 commented Jan 8, 2021

Bug report

Description:

When we Hook into a plugin, and there is a name conflict with an other plugin or the api has changed, exceptions like the one below happens. We should gennerly catch them and give better information about it. The really bad thing with it is, that the plugin is not enabled correctly and it does not work anymore.

[11:36:15 ERROR]: Error occurred while enabling BetonQuest v1.12.0-DEV-408 (Is it up to date?)
java.lang.NoClassDefFoundError: me/blackvein/quests/Quests
        at pl.betoncraft.betonquest.compatibility.quests.QuestsIntegrator.hook(QuestsIntegrator.java:27) ~[?:?]
        at pl.betoncraft.betonquest.compatibility.Compatibility.hook(Compatibility.java:157) ~[?:?]
        at pl.betoncraft.betonquest.compatibility.Compatibility.<init>(Compatibility.java:80) ~[?:?]
        at pl.betoncraft.betonquest.BetonQuest.onEnable(BetonQuest.java:602) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:470) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:240) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:938) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:179) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.ClassNotFoundException: me.blackvein.quests.Quests
        at java.net.URLClassLoader.findClass(URLClassLoader.java:471) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:182) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:111) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
        ... 14 more

How to reproduce:

I got this issue wthi this plugin: https://www.spigotmc.org/resources/%E2%96%B6-quests-%E2%97%80-set-up-goals-for-players.23696/updates
It is not the supported Quests plugin that we want

How to solve

If you run into this ploblem, go into the config.yml and disable the hook for this plugin.

@Wolf2323 Wolf2323 added the Bug A bug in the code or in a documentation. label Jan 8, 2021
@Wolf2323 Wolf2323 added this to TODO in BetonQuest 2.0.0 via automation Jan 8, 2021
@Wolf2323 Wolf2323 moved this from TODO to TODO Pre-Release 2 in BetonQuest 2.0.0 Jan 9, 2021
@SaltyAimbOtter SaltyAimbOtter added the Confirmed Something is confimed. label Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in the code or in a documentation. Confirmed Something is confimed.
Projects
Status: Todo
BetonQuest 2.0.0
  
TODO Pre-Release 2
Development

No branches or pull requests

2 participants