AntiShare

76k Downloads

Bug with WorldGuard and Gamemode switching

oORolandOo opened this issue ยท 1 comments

commented

I keep getting an error when I try to leave a AntiShare zone that is linked with a WorldGuard zone. It changes my gamemode/inventory when I enter the zone and it changes the inventory when I exit but does not change my game mode back to normal, do I need to make another zone around it to say go back to survival?
I am notified with " [AntiShare] You are in a region and therefore cannot change Game Mode " Can I not have a Antishare region in a Worldguard region?

I also get this in the server console:
15:20:07 [SEVERE] Could not pass event PlayerMoveEvent to AntiShare
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
va:303)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
a:62)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
ava:459)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:209)
at net.minecraft.server.Packet10Flying.handle(SourceFile:126)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:7
8)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:551)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Caused by: java.lang.IllegalArgumentException: Mode cannot be null
at org.bukkit.craftbukkit.entity.CraftPlayer.setGameMode(CraftPlayer.jav
a:506)
at com.turt2live.antishare.regions.ASRegion.alertExit(Unknown Source)
at com.turt2live.antishare.ASListener.onMove(Unknown Source)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
va:301)
... 10 more

Not sure if it's a bug or user error ;)

edit
This error (your are in a region) happens even when not in a WorldGuard zone.

commented

Sorry, I fixed the issue. It was my error :)