BanManagement / BanManager

A plugin for Minecraft to manage punishments and moderate more effectively
https://banmanagement.com/
Other
116 stars 90 forks source link

Incompatibility with AsyncWorldEditInjector #973

Closed GedeonGrays closed 1 month ago

GedeonGrays commented 2 years ago

Hello o/ I have a compatibility problem with AsyncWorldEditInjector.

Environment:

Server version: Uranium 1710-dev-5-B285-87f3435 BanManager version: Bukkit 7.6.0 AsyncWorldEdit version: 3.5.4 (the most up-to-date version for Cauldron-like servers) AsyncWorldEditInjector version: 3.5.2 (automatically installed by AWE)

My actions:

As stated in the AWE installation instructions, I put the automatically installed AsyncWorldEditInjector into the mods folder (otherwise WE commands would not work on the server). After starting the server BanManager reported the following error:

[00:58:44] [Server thread/ERROR]: Error occurred while enabling BanManager v7.6.0 (Is it up to date?)
java.lang.NullPointerException
    at me.confuser.banmanager.bukkit.BMBukkitPlugin.setupConfigs(BMBukkitPlugin.java:100) ~[?:?]
    at me.confuser.banmanager.bukkit.BMBukkitPlugin.onEnable(BMBukkitPlugin.java:46) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[JavaPlugin.class:1.7.10-R0.1-SNAPSHOT]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:384) [JavaPluginLoader.class:1.7.10-R0.1-SNAPSHOT]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:410) [SimplePluginManager.class:1.7.10-R0.1-SNAPSHOT]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:420) [CraftServer.class:1.7.10-R0.1-SNAPSHOT]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:352) [CraftServer.class:1.7.10-R0.1-SNAPSHOT]
    at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:507) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:481) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:441) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:356) [lt.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:627) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]

Of course, without AsyncWorldEditInjector BanManager works fine.

P. S. I am using BanManager version 7.6.0, not the latest, due to the problem mentioned by @Letboes in the #support channel of your Discord server. P. P. S. I understand that I probably should have asked the AWE developers for a fix, but I'm afraid they no longer support 1.7.10. So thanks in advance for your time.

confuser commented 2 years ago

Thanks for the detailed bug! Looking at the stack trace, it appears to be a similar issue with other plugins which change/break resource loading. AsyncWorldEditInjector appears to be open source, so I'll take a look to see if I can track down what exactly is causing this.

confuser commented 2 years ago

P. S. I am using BanManager version 7.6.0, not the latest, due to the problem mentioned by @Letboes in the #support channel of your Discord server.

@GedeonGrays This should now be resolved in the latest developer version. Can you please try updating and paste the output of what error is shown now?

I'm expecting a message like Unable to start BanManager as X has broken resource loading forcing BanManager to load their plugin.yml file; please alert the author to resolve this issue

I've looked into AsyncWorldEditInjector and it appears to contain a lot of reflection, hypothesis is it's somehow overriding a class which is causing this problem 🤔

GedeonGrays commented 2 years ago

Can you please try updating and paste the output of what error is shown now?

Sure, I'll check it out soon.

GedeonGrays commented 2 years ago

Yep, when starting the server with the latest developer version of BanManager and AWEInjector the following warning appears:

[05:54:24] [Server thread/WARN]: java.io.IOException: Unable to start BanManager as AsyncWorldEditInjector has broken resource loading forcing BanManager to load their plugin.yml file; please alert the author to resolve this issue
[05:54:24] [Server thread/WARN]:    at me.confuser.banmanager.bukkit.BMBukkitPlugin.setupConfigs(BMBukkitPlugin.java:102)
[05:54:24] [Server thread/WARN]:    at me.confuser.banmanager.bukkit.BMBukkitPlugin.onEnable(BMBukkitPlugin.java:46)
[05:54:24] [Server thread/WARN]:    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316)
[05:54:24] [Server thread/WARN]:    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:384)
[05:54:24] [Server thread/WARN]:    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:410)
[05:54:24] [Server thread/WARN]:    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:420)
[05:54:24] [Server thread/WARN]:    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:352)
[05:54:24] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:507)
[05:54:24] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:481)
[05:54:24] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:441)
[05:54:24] [Server thread/WARN]:    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:356)
[05:54:24] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:627)
[05:54:24] [Server thread/WARN]:    at java.lang.Thread.run(Thread.java:748)

By the way, the same build of BanManager works fine without the AWEInjector, so the problem mentioned by @Letboes seems to be solved.

Weylend commented 1 month ago

@GedeonGrays How did you solve this?

GedeonGrays commented 1 month ago

@GedeonGrays How did you solve this?

To be honest, I no longer remember exactly what I did or if my actions helped solve the problem at all. Right now, I have the following versions of the files, which probably work: BanManager version: 5.8.0 AsyncWorldEdit version: 2.3.3 AsyncWorldEditInjector version: 2.3.0

Weylend commented 1 month ago

@confuser still broken with versions above but with Banmanager 7.9.0

confuser commented 1 month ago

@confuser still broken with versions above but with Banmanager 7.9.0

@Weylend the issue isn't with BM, nothing I can do on this side to resolve it. The plugins overwriting resource loading need to fix the issue