BadWords

34 - Will not kick/ban using Async player kick (Spigot)

What steps will reproduce the problem?
1. Install Spigot #934 and BadWords 1.41
2. Build up enough warnings for a kick/ban
3.

What is the expected output? What do you see instead? I expect to get kicked or banned, but get a console error:

14:32:20 [SEVERE] Could not pass event AsyncPlayerChatEvent to BadWords v1.25
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:30)
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:478)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:460)
        at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:906)
        at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:846)
        at net.minecraft.server.v1_5_R3.Packet3Chat.handle(Packet3Chat.java:44)
        at org.spigotmc.netty.NettyNetworkManager$2.run(NettyNetworkManager.java:130)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalStateException Asynchronous player kick!
        at org.bukkit.craftbukkit.v1_5_R3.entity.CraftPlayer.kickPlayer(CraftPlayer.java:217)
        at uk.co.warmlight.andrew.BadWords.BadWords.kickBadPeople(BadWords.java:253)
        at uk.co.warmlight.andrew.BadWords.ServerChatPlayerListener.onPlayerChat(ServerChatPlayerListener.java:56)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
        ... 14 more

What version of the product are you using?

1.41

Do you have an error log of what happened?

Above.

Please provide any additional information below.

I saw your ticket here: http://dev.bukkit.org/bukkit-plugins/badwords/tickets/28-async-player-chat-kick-ban-problems/

And tried that build, but I get the same problem. I found a similar issue posted on the Spigot forums, which would probably help in solving this: http://www.spigotmc.org/threads/java-lang-illegalstateexception-cannot-kick-player-from-asynchronous-thread.289/

Spigot apparently blocks player kicks on asynchronous threads, causing this error.

Thanks

User When Change
cheracc Jul 01, 2013 at 18:39 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

Facts

Reported
Jul 01, 2013
Status
New - Issue has not had initial review yet.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees