crashdemons / DisplayItem-Spigot

rewrite of DisplayItem for use in Spigot 1.13+ (uses BungeeChat components)
5 stars 0 forks source link

Could not pass event AsyncPlayerChatEvent to DisplayItem #2

Closed TechTailor closed 4 years ago

TechTailor commented 4 years ago

Hello,

It seems that this plugin doesnt work with Async installed. Would appreciate if you can provide a fix or work around this.

[ERROR] .... Could not pass event AsyncPlayerChatEvent to DisplayItem v2.4.1-SNAPSHOT

java.lang.StringIndexOutOfBoundsException: String index out of range: 0

at java.lang.String.substring(String.java:2695) ~[?:1.8.0_212]

at com.github.crashdemons.displayitem_spigot.SplitChatMessage.fromWithExternalReplacement(SplitChatMessage.java:27) ~[?:?]

at com.github.crashdemons.displayitem_spigot.SplitChatMessage.from(SplitChatMessage.java:40) ~[?:?]

at com.github.crashdemons.displayitem_spigot.ChatLineFormatter.chatLineInsertItem(ChatLineFormatter.java:54) ~[?:?]

at com.github.crashdemons.displayitem_spigot.ChatEventExecutor.onChat(ChatEventExecutor.java:82) ~[?:?]

at com.github.crashdemons.displayitem_spigot.ChatEventExecutor.execute(ChatEventExecutor.java:47) ~[?:?]

at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[patched_1.14.4.jar:git-Paper-225]

at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.14.4.jar:git-Paper-225]

at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:545) ~[patched_1.14.4.jar:git-Paper-225]

at net.minecraft.server.v1_14_R1.PlayerConnection.chat(PlayerConnection.java:1713) ~[patched_1.14.4.jar:git-Paper-225]

at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1628) ~[patched_1.14.4.jar:git-Paper-225]

at net.minecraft.server.v1_14_R1.PacketPlayInChat$1.run(PacketPlayInChat.java:41) ~[patched_1.14.4.jar:git-Paper-225]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_212]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_212]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]

at java.lang.Thread.run(Thread.java:813) [?:1.8.0_212]

Using 1.14.4 (Paper build 226).

crashdemons commented 4 years ago

This doesn't seem to be an async issue but a logic issue.

Could you post your configuration for DisplayItem, and if possible the message that triggers the problem? thank you.

crashdemons commented 4 years ago

I wanted to remind you that it has been a month since your original report and my request for more information.

My initial tests back in November were not able to reproduce this and they seemed to indicate it could be related to a specific config format or post format you use, but this is not confirmed without more information from you.

If you are not able to provide more information, the issue will have to be closed for now.