Chestshop not work with WorldGuard beta 3
andris155 opened this issue · 6 comments
Plugin Version
[The full plugin version that you are running from /version ChestShop]
[15:43:32] [Server thread/INFO]: ChestShop version 3.10-SNAPSHOT (build 149)
Plugin Config
[The full config.yml file of ChestShop]
Default config
Server Version
[The full server version that you are running from /version]
This server is running Paper version git-Paper-632 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)
Server Log
[The full latest.log file, especially important if you have a stack trace]
What other plugins are you running?
[List of your plugins, ideally with the version]
ChestShop, FastAsyncWorldEdit, Vault, WorldEdit, WorldGuard
What is happening?
[Explain what happens and what steps should be done to reproduce the issue. Ideally with pictures and the full error log!]
Chestshop not work with WorldGuard beta 3. Fawe not support newer Worldguard versions.
What did you expect to happen?
[Explain what you expected to happen after performing the previously described steps]
Chestshop work with WorldGuard beta 3
Additional context
[Add any other context or screenshots about the feature request here.]
[15:36:54] [Server thread/INFO]: [FastAsyncWorldEdit] Enabling FastAsyncWorldEdit v1.13-breaking
[15:36:54] [Server thread/INFO]: [WorldGuard] Enabling WorldGuard v7.0.0-beta-03;e51a220
[15:36:54] [Server thread/INFO]: [WorldGuard] Default configuration file written: C:\Users\andris155\Downloads\plugins\WorldGuard\config.yml
[15:36:54] [Server thread/INFO]: [WorldGuard] Default configuration file written: C:\Users\andris155\Downloads\plugins\WorldGuard\worlds\world\config.yml
[15:36:54] [Server thread/INFO]: [WorldGuard] Default configuration file written: C:\Users\andris155\Downloads\plugins\WorldGuard\worlds\world\blacklist.txt
[15:36:54] [Server thread/INFO]: [WorldGuard] (world) TNT ignition is PERMITTED.
[15:36:54] [Server thread/INFO]: [WorldGuard] (world) Lighters are PERMITTED.
[15:36:54] [Server thread/INFO]: [WorldGuard] (world) Lava fire is blocked.
[15:36:54] [Server thread/INFO]: [WorldGuard] (world) Fire spread is UNRESTRICTED.
[15:36:54] [Server thread/INFO]: [WorldGuard] Loaded configuration for world 'world'
[15:36:54] [Server thread/INFO]: [WorldGuard] Default configuration file written: C:\Users\andris155\Downloads\plugins\WorldGuard\worlds\world_nether\config.yml
[15:36:54] [Server thread/INFO]: [WorldGuard] Default configuration file written: C:\Users\andris155\Downloads\plugins\WorldGuard\worlds\world_nether\blacklist.txt
[15:36:54] [Server thread/INFO]: [WorldGuard] (world_nether) TNT ignition is PERMITTED.
[15:36:54] [Server thread/INFO]: [WorldGuard] (world_nether) Lighters are PERMITTED.
[15:36:54] [Server thread/INFO]: [WorldGuard] (world_nether) Lava fire is blocked.
[15:36:54] [Server thread/INFO]: [WorldGuard] (world_nether) Fire spread is UNRESTRICTED.
[15:36:54] [Server thread/INFO]: [WorldGuard] Loaded configuration for world 'world_nether'
[15:36:54] [Server thread/INFO]: [WorldGuard] Default configuration file written: C:\Users\andris155\Downloads\plugins\WorldGuard\worlds\world_the_end\config.yml
[15:36:54] [Server thread/INFO]: [WorldGuard] Default configuration file written: C:\Users\andris155\Downloads\plugins\WorldGuard\worlds\world_the_end\blacklist.txt
[15:36:54] [Server thread/INFO]: [WorldGuard] (world_the_end) TNT ignition is PERMITTED.
[15:36:54] [Server thread/INFO]: [WorldGuard] (world_the_end) Lighters are PERMITTED.
[15:36:54] [Server thread/INFO]: [WorldGuard] (world_the_end) Lava fire is blocked.
[15:36:54] [Server thread/INFO]: [WorldGuard] (world_the_end) Fire spread is UNRESTRICTED.
[15:36:54] [Server thread/INFO]: [WorldGuard] Loaded configuration for world 'world_the_end'
[15:36:54] [Server thread/INFO]: [WorldGuard] Unloading and saving region data that is currently loaded...
[15:36:54] [Server thread/INFO]: [WorldGuard] Loading region data for loaded worlds...
[15:36:54] [Server thread/INFO]: [WorldGuard] Regions saved after UUID migration! This won't happen again unless you change the relevant configuration option in WorldGuard's config.
[15:36:54] [Server thread/ERROR]: Error occurred while enabling WorldGuard v7.0.0-beta-03;e51a220 (Is it up to date?)
java.lang.ExceptionInInitializerError: null
at com.sk89q.worldguard.WorldGuard.setup(WorldGuard.java:98) ~[?:?]
at com.sk89q.worldguard.bukkit.WorldGuardPlugin.onEnable(WorldGuardPlugin.java:135) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:265) ~[patched_1.13.2.jar:git-Paper-632]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:334) ~[patched_1.13.2.jar:git-Paper-632]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:412) ~[patched_1.13.2.jar:git-Paper-632]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugin(CraftServer.java:443) ~[patched_1.13.2.jar:git-Paper-632]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugins(CraftServer.java:357) ~[patched_1.13.2.jar:git-Paper-632]
at net.minecraft.server.v1_13_R2.MinecraftServer.l(MinecraftServer.java:608) ~[patched_1.13.2.jar:git-Paper-632]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:570) ~[patched_1.13.2.jar:git-Paper-632]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:431) ~[patched_1.13.2.jar:git-Paper-632]
at net.minecraft.server.v1_13_R2.DedicatedServer.init(DedicatedServer.java:316) ~[patched_1.13.2.jar:git-Paper-632]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:787) ~[patched_1.13.2.jar:git-Paper-632]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: com.sk89q.worldguard.protection.flags.registry.FlagConflictException: A flag already exists by the name allow-shop
at com.sk89q.worldguard.protection.flags.registry.SimpleFlagRegistry.forceRegister(SimpleFlagRegistry.java:88) ~[?:?]
at com.sk89q.worldguard.protection.flags.registry.SimpleFlagRegistry.register(SimpleFlagRegistry.java:64) ~[?:?]
at com.sk89q.worldguard.protection.flags.Flags.register(Flags.java:157) ~[?:?]
at com.sk89q.worldguard.protection.flags.Flags.<clinit>(Flags.java:147) ~[?:?]
... 13 more
[And Delete the lines in square brackets!]
Hmm, TIL
cheers @Phoenix616
Issue lies in the order in which the plugins are loaded/enabled
CS3 is loaded before WG beta 3 is enabled
CS3's onLoad
inits the dependencies, which causes CS3 to register an allow-shop
flag before WG.
This causes the conflict, as WG register all of its flags on its onEnable
. When it sees that there is an allow-shop
flag already present, it freaks out and then shuts down, breaking several other plugins in the process (for me, mcMMO and Towny, as those took events that WG listened for)
I haven't tested the newest version, but I've just made a fork that swaps where CS3 loads its dependencies, moving it from onLoad
to onEnable
. It seems to work for me.
@andris155 Try cloning this and then building the JAR.
https://github.com/PhoenixOrigins/ChestShop-3/
@jstnf initialising flags in the onLoad is required by WG, you can't add flags any later. That WG doesn't like it is a bug in it and (most likely) fixed in a later version ;)