UtechtDustin / Builder-s-Wand

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WorldGuard issue

Alchemi1963 opened this issue · comments

Hey, I have an issue with worldguard compatibility.
WorldGuard version 7.0.0-SNAPSHOT;0dc5781
BuildersWand version 2.6.1

I am using FAWE instead of regular worldedit.

Like the plugin even though it doesn't work at all rn!

18.03 00:18:55 [Server] WARN Task #254 for BuildersWand v2.6.1 generated an exception 18.03 00:18:55 [Server] INFO java.lang.NoSuchMethodError: com.sk89q.worldguard.bukkit.WorldGuardPlugin.canBuild(Lorg/bukkit/entity/Player;Lorg/bukkit/Location;)Z 18.03 00:18:55 [Server] INFO at de.False.BuildersWand.events.WandEvents.isAllowedToBuildForExternalPlugins(WandEvents.java:574) ~[BuildersWand.jar:?] 18.03 00:18:55 [Server] INFO at de.False.BuildersWand.events.WandEvents.setBlockSelection(WandEvents.java:406) ~[BuildersWand.jar:?] 18.03 00:18:55 [Server] INFO at de.False.BuildersWand.events.WandEvents.access$500(WandEvents.java:43) ~[BuildersWand.jar:?] 18.03 00:18:55 [Server] INFO at de.False.BuildersWand.events.WandEvents$1.run(WandEvents.java:101) ~[BuildersWand.jar:?] 18.03 00:18:55 [Server] INFO at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:392) [spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:889) [spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417) [spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:831) [spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:729) [spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171] 18.03 00:18:55 [Server] WARN Task #254 for BuildersWand v2.6.1 generated an exception 18.03 00:18:55 [Server] INFO java.lang.NoSuchMethodError: com.sk89q.worldguard.bukkit.WorldGuardPlugin.canBuild(Lorg/bukkit/entity/Player;Lorg/bukkit/Location;)Z 18.03 00:18:55 [Server] INFO at de.False.BuildersWand.events.WandEvents.isAllowedToBuildForExternalPlugins(WandEvents.java:574) ~[BuildersWand.jar:?] 18.03 00:18:55 [Server] INFO at de.False.BuildersWand.events.WandEvents.setBlockSelection(WandEvents.java:406) ~[BuildersWand.jar:?] 18.03 00:18:55 [Server] INFO at de.False.BuildersWand.events.WandEvents.access$500(WandEvents.java:43) ~[BuildersWand.jar:?] 18.03 00:18:55 [Server] INFO at de.False.BuildersWand.events.WandEvents$1.run(WandEvents.java:101) ~[BuildersWand.jar:?] 18.03 00:18:55 [Server] INFO at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:392) [spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:889) [spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417) [spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:831) [spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:729) [spigot-1.13.2.jar:git-Spigot-3cb9dcb-8b1588e] 18.03 00:18:55 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]

The most important part I believe is this: java.lang.NoSuchMethodError: com.sk89q.worldguard.bukkit.WorldGuardPlugin.canBuild(Lorg/bukkit/entity/Player;Lorg/bukkit/Location;)Z

@Alchemi1963
Could you send me the download page of the Plugin ?
The download in the Description of the github page does not work for me.

I found the Download, but it seems that this is a issue by worldguard.
Please report the Issue to the worldguard team (https://dev.enginehub.org/youtrack/issues/WORLDGUARD).

I am terribly sorry but i do not agree with your view on this
they are not going to "fix" it as many many plugins have had this "issue".
it's clear they depricated the function and assume people will use the new proper methods.

Pseudo-code:
Location loc = new Location(world, 10, 64, 100);
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
ApplicableRegionSet set = query.getApplicableRegions(loc);
LocalPlayer localPlayer = WorldGuardPlugin.inst().wrapPlayer(player);
if (!set.testState(localPlayer, Flags.BUILD)) {
event.setCancelled(true);
}

also i don't think your plugin should break due to an error cause by another plugin.
please just either adjust the function or at the very least try catch it

Oh i okay i didnt knew it, i thought its an issue by the "worldguard clone".
But currently i cant develop the Plugin because the minecraft launcher dont work on linux (bug is already reported to mojang).

I fixed that issue, but im not able to compile it because i can only use one Version at once.
That means maven will not compile because he cant find a method (of the old worldguard api).

@ThexXTURBOXx could you help me ? how can i use both versions of the worldguard api ?

What exactly do you mean by "use only one Version at once"? Do you mean worldguard 6 and 7 oder worldguard and FAWE?
I could try to solve that issue in a few hours (i need to sleep first). So, when you push your changes, I can help probably

I already fixed the issue (fca3791), the problem is if i use version 7 of worldguard maven will not compile because he cant find the method canBuild of the worldguard version 6.
If i use worldguard 6 in Maven, it will also not compile because he don't know the new functions from version 7.

Fixed in 2.8.0