WorldGuard

WorldGuard

8M Downloads

[SEVERE] Could not pass event AsyncPlayerChatEvent to WorldGuard v5.7.3

LadyCailinBot opened this issue ยท 3 comments

commented

WORLDGUARD-2778 - Reported by 00firestar00

Not sure if there is a later version that fixes this issue. Checked the source code and it appears the problem still may occur. The issue happened after I was testing my own Chat Channel plugin that I have programmed. It appears to NPE onPlayerChat()
I originally thought it may be interfering with my chat channels, but the line in question seems to be returning NULL when it returns the world configuration:
WorldConfiguration wcfg = plugin.getGlobalStateManager().get(player.getWorld());

Here is the stack trace:
03:44:29 [SEVERE] Could not pass event AsyncPlayerChatEvent to WorldGuard v5.7.3
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:26)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:479)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:461)
at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:900)
at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:840)
at net.minecraft.server.v1_5_R3.Packet3Chat.handle(Packet3Chat.java:44)
at org.spigotmc.netty.NettyNetworkManager$2.run(NettyNetworkManager.java:113)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.sk89q.worldguard.bukkit.WorldGuardPlayerListener.onPlayerChat(WorldGuardPlayerListener.java:369)
at sun.reflect.GeneratedMethodAccessor46.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.java:425)
... 14 more

I will look to see if my plugin is causing it, but I suggest modifying the "ConfigurationManager.java" to catch NULLs

commented

Comment by 00firestar00

I would rather not change the OP, but after looking at the server log, it appears that this was linked to essentials unable to read the player file "java.io.FileNotFoundException" when the player tried to chat, WorldGuard threw the error above.

commented

Comment by 00firestar00

So I do not know what the issue is. I fixed the issue with Essentials not finding the file. It appears this error only happens when 1 particular player joins and tries to talk. and even then, it only happens when they are the only player online.

I am trying to give more information on how to replicate it, but my initial thought was it was conflicting with essentials or my chat plugin. Still even if you cannot replicate it, I do recommend handling for NPEs

commented

Comment by 00firestar00

It appears my Chat Channels plugin may be causing the issue, I will try and fix it on my end.