Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messages ending in \ cause error #33

Open
EbonJaeger opened this issue Apr 22, 2017 · 0 comments
Open

Messages ending in \ cause error #33

EbonJaeger opened this issue Apr 22, 2017 · 0 comments

Comments

@EbonJaeger
Copy link

EbonJaeger commented Apr 22, 2017

When a player on the game server sends a chat message ending in a backslash (not forward slash), an error is thrown and the message does not reach the Discord server. Here is a snippet of my server log with an example of this:

[15:27:17] [Event Dispatcher Handler/INFO]: [Discord] EbonJaeger» hey do messages with a <backslash> at the end still break?

[15:27:28] [Async Chat Thread - #10/ERROR]: Could not pass event AsyncPlayerChatEvent to DiscordMC v1.4.12
org.bukkit.event.EventException
	at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:46) ~[patched_1.11.2.jar:git-Paper-1029]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:74) ~[patched_1.11.2.jar:git-Paper-1029]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.11.2.jar:git-Paper-1029]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) [patched_1.11.2.jar:git-Paper-1029]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:499) [patched_1.11.2.jar:git-Paper-1029]
	at net.minecraft.server.v1_11_R1.PlayerConnection.chat(PlayerConnection.java:1299) [patched_1.11.2.jar:git-Paper-1029]
	at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:1214) [patched_1.11.2.jar:git-Paper-1029]
	at net.minecraft.server.v1_11_R1.PacketPlayInChat$1.run(PacketPlayInChat.java:39) [patched_1.11.2.jar:git-Paper-1029]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.lang.IllegalArgumentException: character to be escaped is missing
	at java.util.regex.Matcher.appendReplacement(Matcher.java:809) ~[?:1.8.0_121]
	at java.util.regex.Matcher.replaceAll(Matcher.java:955) ~[?:1.8.0_121]
	at java.lang.String.replaceAll(String.java:2223) ~[?:1.8.0_121]
	at eu.manuelgu.discordmc.listener.ChatListener.onAsyncPlayerChat(ChatListener.java:59) ~[?:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor85.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:44) ~[patched_1.11.2.jar:git-Paper-1029]
	... 12 more
[15:27:28] [Async Chat Thread - #10/INFO]: [SMod] Hotasflames» lets find out<backslash>

Messages with a backslash in other spots do not cause this error, though the slash character is stripped from the message in the Discord channel. Likewise it will be stripped from a message from Discord to the Minecraft server. I'm not sure if this is intended behavior, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants