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

Chat error (Should be easy fix) #35

Closed
JordanFromIT opened this issue Jul 15, 2014 · 2 comments
Closed

Chat error (Should be easy fix) #35

JordanFromIT opened this issue Jul 15, 2014 · 2 comments
Labels

Comments

@JordanFromIT
Copy link

So using your latest dev build of factions, I get this error thrown everytime a player talks in chat.

[03:18:54 ERROR]: Could not pass event AsyncPlayerChatEvent to Factions v1.6.9.5-U0.1.3
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:299) ~[spigot.jar:git-Spigot-1551]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-1551]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot.jar:git-Spigot-1551]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [spigot.jar:git-Spigot-1551]
at net.minecraft.server.v1_7_R4.PlayerConnection.chat(PlayerConnection.java:938) [spigot.jar:git-Spigot-1551]
at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:878) [spigot.jar:git-Spigot-1551]
at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28) [spigot.jar:git-Spigot-1551]
at net.minecraft.server.v1_7_R4.PacketPlayInChat$1.run(PacketPlayInChat.java:59) [spigot.jar:git-Spigot-1551]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_05]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_05]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_05]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_05]
Caused by: java.util.UnknownFormatConversionException: Conversion = '*'
at org.bukkit.event.player.AsyncPlayerChatEvent.setFormat(AsyncPlayerChatEvent.java:100) ~[spigot.jar:git-Spigot-1551]
at com.massivecraft.factions.zcore.MPluginSecretPlayerListener.onPlayerChat(MPluginSecretPlayerListener.java:48) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_05]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:296) ~[spigot.jar:git-Spigot-1551]
... 12 more

@drtshock
Copy link
Owner

Looks like your * is the issue. Not sure why that would error. Let me take a look.

@keir-nellyer
Copy link

Looks like you have a percent symbol (%) before the asterisk () which causes this error. So for example your chat format is set to something like "blah blah % blah blah" to fix this issue simply double act the percentage so it becomes "blah blah %%* blah blah". Don't worry, the percent symbol will only show once.

This is unavoidable as we use the String formatter to format the strings (chat format), the formatter treats the percent symbol and the character after it specially. To avoid this we escape the % symbol (so that the formatter doesn't treat it specially) and to do this we use double percent symbols.

If you didn't understand the last paragraph, don't worry ;)

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

No branches or pull requests

3 participants