Shopkeepers

Shopkeepers

2M Downloads

Incompatibility with Fast Async WorldEdit

HolographicWings opened this issue ยท 4 comments

commented

Hello
the plugin Fast Async WorldEdit is a fork of World edit who add the flag : allow-shop for worldguard
https://www.spigotmc.org/resources/fast-async-worldedit-voxelsniper.13932/
it's the same of Shopkeeper, so these two plugins are incompatible
can you change the name of the flag please ?
crash log of the worldguard plugin (line 165) : http://haste.athion.net/onirucojup.md

1.14 version of async world edit : https://ci.athion.net/job/FastAsyncWorldEdit-1.14/
compatible version of worldguard for async world edit : https://dev.bukkit.org/projects/worldguard/files/2663455/download

commented

Can you link me to the code of AsyncWorldEdit registering this flag? I don't seem to be able to find it via code search in their repository.

However, there should be no issue with multiple plugins trying to register this flag, if those plugins are doing it correctly. The purpose is to have a single flag which is the same across all shop plugins. Otherwise server admins would have to use a specific flag for each shop plugin, and there would be no way for some other plugin to determine if some region is a 'shop region' without being aware of all the individual shop region flags of all the different shop plugins existing..

Regarding registering the flag correctly:
Shopkeepers for example catches the exception resulting from WorldGuard if the flag is already registered. Checking if the flag is already registered would work as well.
ChestShop for example is doing it this way as well: https://github.com/ChestShop-authors/ChestShop-3/blob/master/src/main/java/com/Acrobot/ChestShop/Plugins/WorldGuardFlags.java
So there should be no issue with those two plugins running side by side.

My current guess regarding your issue is that you are using an outdated version of WorldGuard: WorldGuard registered this flag itself in the past, but they removed it some time ago and left it to plugins to register it (since it doesn't use it itself).
So if you are using an older version of WorldGuard, and some other plugin such as Shopkeepers has already registered the flag, then WorldGuard itself will fail to register the flag.

You seem to be using a build from january. The flag got removed from WorldGuard in March.
You can find the latest dev builds of WorldGuard here: http://builds.enginehub.org/job/worldguard

If you for some compatibility related reason cannot use a newer version of WorldGuard, then you will either have to get those involved plugins to update, or remove Shopkeepers for the time being. The flag got added to Shopkeepers in v2.7.0. There are no 1.14 compatible versions of Shopkeepers without this flag.
It is also not possible to add a config setting for not registering this flag to Shopkeepers, since WorldGuard requires flag to be registered on plugin load (very early; before plugin enable), at which point the config is not yet loaded. (Might maybe be solveable though by moving config loading into plugin's onLoad .. not sure right now)

commented

i have send a message to the dev of AsyncWorldEdit if they have a way for a fix, because their plugin need a specific version of worldguard

commented

I moved the config loading into the onLoad phase of the plugin and added a config setting 'register-world-guard-allow-shop-flag'. Note that changing this setting has no effect until the next server restart or full server reload.

A snapshot for testing this is available here: https://nexus.lichtspiele.org/repository/snapshots/com/nisovin/shopkeepers/Shopkeepers/2.8.0-SNAPSHOT/Shopkeepers-2.8.0-20190819.232314-10.jar
(The website seems to be having some ssl certificate issue currently though)

commented

Fixed in v2.8.0