aromaa / WorldGuardExtraFlags

Extension for the WorldGuard plugin.
https://www.spigotmc.org/resources/worldguard-extra-flags.4823
MIT License
90 stars 71 forks source link

Plugin won't load in 1.17 at all. #185

Closed IAmNotLiable closed 2 years ago

IAmNotLiable commented 3 years ago

I see people are able to load the plugin in 1.17, but with some issues. Mine disables itself after realizing it's out of date so is completely unusable. See below.

[19:42:13 INFO]: [WorldGuard] Registering session handler net.goldtreeservers.worldguardextraflags.wg.handlers.FlySpeedFlagHandler

[19:42:13 INFO]: [WorldGuard] Registering session handler net.goldtreeservers.worldguardextraflags.wg.handlers.PlaySoundsFlagHandler

[19:42:13 INFO]: [WorldGuard] Registering session handler net.goldtreeservers.worldguardextraflags.wg.handlers.GlideFlagHandler

[19:42:13 ERROR]: Error occurred while enabling WorldGuardExtraFlags v4.1.5-SNAPSHOT (Is it up to date?) java.lang.NoClassDefFoundError: com/comphenix/protocol/ProtocolLibrary at net.goldtreeservers.worldguardextraflags.protocollib.ProtocolLibHelper.onEnable(ProtocolLibHelper.java:23) ~[WorldGuardExtraFlags.jar:?] at net.goldtreeservers.worldguardextraflags.WorldGuardExtraFlagsPlugin.onEnable(WorldGuardExtraFlagsPlugin.java:192) ~[WorldGuardExtraFlags.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.17.1.jar:git-Paper-251] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.17.1.jar:git-Paper-251] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.1.jar:git-Paper-251] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:535) ~[patched_1.17.1.jar:git-Paper-251] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:449) ~[patched_1.17.1.jar:git-Paper-251] at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:725) ~[patched_1.17.1.jar:git-Paper-251] at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:306) ~[patched_1.17.1.jar:git-Paper-251] at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1212) ~[patched_1.17.1.jar:git-Paper-251] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-251] at java.lang.Thread.run(Thread.java:831) [?:?] Caused by: java.lang.ClassNotFoundException: com.comphenix.protocol.ProtocolLibrary at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:146) ~[patched_1.17.1.jar:git-Paper-251] at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:103) ~[patched_1.17.1.jar:git-Paper-251] at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?] ... 12 more > [19:42:13 INFO]: [WorldGuardExtraFlags] Disabling WorldGuardExtraFlags v4.1.5-SNAPSHOT

Do I need to disable an updatechecker or something to force it to work?

Happily-Coding commented 2 years ago

Basicly, its a problem with the line 23 of this file: https://github.com/aromaa/WorldGuardExtraFlagsPlugin/blob/32e27117324e1d15ed70105cff0c36c4a889660d/Spigot/src/main/java/net/goldtreeservers/worldguardextraflags/protocollib/ProtocolLibHelper.java#L10

The cause is probably that this plugin is using an outdated version of protocol lib as a dependancy (4.5.0 when the new version is 4.7.0 apparently). The fix could be as simple as changing this file: https://github.com/aromaa/WorldGuardExtraFlagsPlugin/blob/32e27117324e1d15ed70105cff0c36c4a889660d/Spigot/pom.xml And recompiling, or it could be more complex.