Shopkeepers

Shopkeepers

2M Downloads

Cannot place shopkeeper with installed worldguard

Schpammer opened this issue ยท 4 comments

commented

Preliminaries:

  • Shopkeepers version: 2.4.0
  • Spigot version: 1.13.2

Reproduction on a fresh and up-to-date Spigot server:

I was able to reproduce my issue on a freshly setup and up-to-date Spigot server (currently 1.13.2) with the latest version of Shopkeepers (currently 2.4.0), together with the current WorldGuard 7.0.0 Beta 1.

The issue:

Description:
Cannot place a shopkeeper. It throws an error in the console:

Could not pass event PlayerInteractEvent to Shopkeepers v2.4.0
org.bukkit.event.EventException: null
        at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) ~[patched_1.13.2.jar:git-Paper-442]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.13.2.jar:git-Paper-442]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.13.2.jar:git-Paper-442]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:513) ~[patched_1.13.2.jar:git-Paper-442]
        at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:314) ~[patched_1.13.2.jar:git-Paper-442]
        at net.minecraft.server.v1_13_R2.PlayerInteractManager.a(PlayerInteractManager.java:465) ~[patched_1.13.2.jar:git-Paper-442]
        at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1327) ~[patched_1.13.2.jar:git-Paper-442]
        at net.minecraft.server.v1_13_R2.PacketPlayInUseItem.a(PacketPlayInUseItem.java:37) ~[patched_1.13.2.jar:git-Paper-442]
        at net.minecraft.server.v1_13_R2.PacketPlayInUseItem.a(PacketPlayInUseItem.java:5) ~[patched_1.13.2.jar:git-Paper-442]
        at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:12) ~[patched_1.13.2.jar:git-Paper-442]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_181]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_181]
        at net.minecraft.server.v1_13_R2.SystemUtils.a(SystemUtils.java:109) ~[patched_1.13.2.jar:git-Paper-442]
        at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1016) ~[patched_1.13.2.jar:git-Paper-442]
        at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439) ~[patched_1.13.2.jar:git-Paper-442]
        at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:943) ~[patched_1.13.2.jar:git-Paper-442]
        at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:841) ~[patched_1.13.2.jar:git-Paper-442]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Caused by: java.lang.NoSuchMethodError: com.sk89q.worldguard.bukkit.WorldGuardPlugin.getRegionManager(Lorg/bukkit/World;)Lcom/sk89q/worldguard/protection/managers/RegionManager;
        at com.nisovin.shopkeepers.pluginhandlers.WorldGuardHandler.isShopAllowed(WorldGuardHandler.java:30) ~[?:?]
        at com.nisovin.shopkeepers.shopkeeper.player.AbstractPlayerShopType.handleSpecificShopkeeperCreation(AbstractPlayerShopType.java:60) ~[?:?]
        at com.nisovin.shopkeepers.shopkeeper.AbstractShopType.handleShopkeeperCreation(AbstractShopType.java:105) ~[?:?]
        at com.nisovin.shopkeepers.SKShopkeepersPlugin.handleShopkeeperCreation(SKShopkeepersPlugin.java:462) ~[?:?]
        at com.nisovin.shopkeepers.shopcreation.CreateListener.onPlayerInteract(CreateListener.java:166) ~[?:?]
        at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:35) ~[patched_1.13.2.jar:git-Paper-442]
        ... 17 more

I'm not shure if it's Worldguards fault or shopkeepers.

commented

Fixed in v2.5.0

commented

I have updated Shopkeepers for WorldGuard 7.0.0, but hadn't yet the time to properly test this. You can find a snapshot with these changes here: http://nexus3.cube-nation.de/repository/snapshots/com/nisovin/shopkeepers/Shopkeepers/2.4.2-SNAPSHOT/Shopkeepers-2.4.2-20181116.004933-3.jar

Let me know if this fixes this issue.

commented

I think Shopkeepers needs an update to adjust for WorldGuard's API changes of version 7.0.0.
Looking into it.

commented

Just tried it out. Works perfectly! No errors and the villager is spawned correctly!

Thank you for that fast fix ๐Ÿ‘