Civcraft / CivMenu

BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

P0: Could not pass event PlayerMoveEvent to CivMenu v1.1.5 org.bukkit.event.EventException #5

Closed ttk2 closed 8 years ago

ttk2 commented 8 years ago

2015-09-20 10:20:50 [ERROR] Could not pass event PlayerMoveEvent to CivMenu v1.1.5 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot.jar:git-Spigot-d97e08b-880a532] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-d97e08b-880a532] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot.jar:git-Spigot-d97e08b-880a532] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot.jar:git-Spigot-d97e08b-880a532] at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:270) [spigot.jar:git-Spigot-d97e08b-880a532] at net.minecraft.server.v1_8_R3.PacketPlayInFlying.a(SourceFile:126) [spigot.jar:git-Spigot-d97e08b-880a532] at net.minecraft.server.v1_8_R3.PacketPlayInFlying$PacketPlayInPositionLook.a(SourceFile:18) [spigot.jar:git-Spigot-d97e08b-880a532] at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-d97e08b-880a532] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_45-internal] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_45-internal] at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot.jar:git-Spigot-d97e08b-880a532] at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:714) [spigot.jar:git-Spigot-d97e08b-880a532] at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot.jar:git-Spigot-d97e08b-880a532] at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:653) [spigot.jar:git-Spigot-d97e08b-880a532] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:556) [spigot.jar:git-Spigot-d97e08b-880a532] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45-internal] Caused by: java.lang.IllegalArgumentException: Cannot measure distance to a null location at org.bukkit.Location.distanceSquared(Location.java:452) ~[spigot.jar:git-Spigot-d97e08b-880a532] at org.bukkit.Location.distance(Location.java:439) ~[spigot.jar:git-Spigot-d97e08b-880a532] at vg.civcraft.mc.civmenu.TOSListener.playerMoveEvent(TOSListener.java:69) ~[?:?] at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45-internal] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45-internal] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-d97e08b-880a532] ... 15 more

erocs commented 8 years ago

Cross-filed to https://github.com/Civcraft/CivChat2/issues/31. XD This is still occurring and the player can sit there filling the console log with these exceptions for as long as they're moving.

idoash4 commented 8 years ago

@Maxopoly Can you get this one? Just add a null check.

Maxopoly commented 8 years ago

I already looked at this and it's more complicated than that. What seems to be happening is that there are unregistered players, who dont have a location in the locations map, so trying to get a location for them gives null. If we just add a null check here they will be able to move around freely as far as I understand this without ever signing any terms.

The actual cause of the problem is either that players manage to slip through the login listener to add their location to the map or something in the data base which keeps track of registered vs unregistered players is broken.

erocs commented 8 years ago

Not much to break in that table. There's 1600 "CivMenu Agreement" records and a bunch of valid looking UUIDs to go with them.