Colors not replacing in VentureChat ChatChannelHookMessageFormat
Androkai opened this issue · 11 comments
Normal ChatChannelHookMessageFormat is:
ChatChannelHookMessageFormat: "%channelcolor%[%channelnickname%]&r %message%"
With VentureChat (only tested with it till now) I have to replace &
with §
to make it work:
ChatChannelHookMessageFormat: "%channelcolor%[%channelnickname%]§r %message%"
I also use colorcodes I had to replace for my own format:
ChatChannelHookMessageFormat: "§8[%channelcolor%%channelnickname%§8]§r %message%"
Maybe this also have to be done for other chatchannel-plugins (needs testing).
The second problem is that Venturechat define color as text within config which is normally replaced later but in combination with DiscordSRV this doesn't work and results in something like that:
DiscordSRV-config:
ChatChannelHookMessageFormat: "§8[%channelcolor%%channelnickname%§8]§r %message%"
VentureChat-config:
channels:
Admin:
color: red
chatcolor: red
mutable: false
filter: false
autojoin: true
default: false
distance: 0
cooldown: 0
bungeecord: false
alias: a
permissions: adminchannel
format: '&f[&cAdmin&f] {prefix} {nickname}&c:'
irc: false
"red" as the channelcolor in front of channelnickname (which is short "a" for AdminChannel) is no longer replaced correctly. I also experimented with using &c or §c in the VentureChat-config but this doesn't work at all.
the hell
On Thursday, August 25, 2016, Christoph Krüger [email protected]
wrote:
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#36 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHVe1MxxhC1rIh3qOEkHFuz9V17Rz_MNks5qjd2rgaJpZM4JpD_W
.
Replaces &
now correctly. Now a solution for VentureChat`s string-colorvariables (red, gold, ...) and it's perfect.
Looks like it needs to be replaced with caps.
[21:10:34 WARN]: [21:10:34] [Fatal] [JDA]: One of the EventListeners had an uncaught exception
[21:10:34 WARN]: [21:10:34] [Fatal] [JDA]: Encountered an exception:
[21:10:34 WARN]: [21:10:34] [Fatal] [JDA]: java.lang.IllegalArgumentException: No enum constant org.bukkit.ChatColor.red
at java.lang.Enum.valueOf(Enum.java:238)
at org.bukkit.ChatColor.valueOf(ChatColor.java:1)
at com.scarsz.discordsrv.hooks.chat.VentureChatHook.broadcastMessageToChannel(VentureChatHook.java:57)
at com.scarsz.discordsrv.DiscordSRV.broadcastMessageToMinecraftServer(DiscordSRV.java:692)
at com.scarsz.discordsrv.listeners.DiscordListener.handleChat(DiscordListener.java:85)
at com.scarsz.discordsrv.listeners.DiscordListener.onMessageReceived(DiscordListener.java:37)
at com.scarsz.discordsrv.jda.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:184)
at com.scarsz.discordsrv.jda.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:64)
at com.scarsz.discordsrv.jda.handle.MessageReceivedHandler.handleDefaultMessage(MessageReceivedHandler.java:94)
at com.scarsz.discordsrv.jda.handle.MessageReceivedHandler.handleInternally(MessageReceivedHandler.java:50)
at com.scarsz.discordsrv.jda.handle.SocketHandler.handle(SocketHandler.java:38)
at com.scarsz.discordsrv.jda.requests.WebSocketClient.handleEvent(WebSocketClient.java:596)
at com.scarsz.discordsrv.jda.requests.WebSocketClient.onTextMessage(WebSocketClient.java:324)
at com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352)
at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:233)
at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:211)
at com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:910)
at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:693)
at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:102)
at com.neovisionaries.ws.client.ReadingThread.run(ReadingThread.java:61)