DiscordSRV / Staff-Chat

A staff-chat plugin that hooks into DiscordSRV
MIT License
29 stars 10 forks source link

IllegalArgumentException: Illegal group reference #32

Closed mibby closed 2 years ago

mibby commented 2 years ago

Staff member was using [i] from another plugin (ShowItem) to display an item in chat. I assume Discord Staff-Chat didn't like that very much.

[12:37:17] [Server thread/INFO]: player issued server command: /ac I assume [i] is defineitely not allowed
[12:37:17] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'ac' in plugin DiscordSRV-Staff-Chat v1.4.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchCommand(CraftServer.java:876) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2268) ~[?:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2079) ~[?:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2060) ~[?:?]
    at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[?:?]
    at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[?:?]
    at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:56) ~[?:?]
    at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[?:?]
    at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1413) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:189) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[?:?]
    at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1391) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1384) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:132) ~[?:?]
    at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1362) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1268) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.1.jar:git-Paper-68]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.IllegalArgumentException: Illegal group reference
    at java.util.regex.Matcher.appendExpandedReplacement(Matcher.java:1067) ~[?:?]
    at java.util.regex.Matcher.appendReplacement(Matcher.java:997) ~[?:?]
    at java.util.regex.Matcher.replaceAll(Matcher.java:1259) ~[?:?]
    at com.rezzedup.discordsrv.staffchat.util.MappedPlaceholder.update(MappedPlaceholder.java:56) ~[DiscordSRV-Staff-Chat-1.4.1.jar:?]
    at com.rezzedup.discordsrv.staffchat.MessageProcessor.sendFormattedChatMessage(MessageProcessor.java:75) ~[DiscordSRV-Staff-Chat-1.4.1.jar:?]
    at com.rezzedup.discordsrv.staffchat.MessageProcessor.processPlayerChat(MessageProcessor.java:178) ~[DiscordSRV-Staff-Chat-1.4.1.jar:?]
    at com.rezzedup.discordsrv.staffchat.StaffChatPlugin.submitMessageFromPlayer(StaffChatPlugin.java:228) ~[DiscordSRV-Staff-Chat-1.4.1.jar:?]
    at com.rezzedup.discordsrv.staffchat.commands.StaffChatCommand.onCommand(StaffChatCommand.java:53) ~[DiscordSRV-Staff-Chat-1.4.1.jar:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    ... 21 more
[12:37:27] [Server thread/INFO]: player issued server command: /ac [i]
[12:37:27] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'ac' in plugin DiscordSRV-Staff-Chat v1.4.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchCommand(CraftServer.java:876) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2268) ~[?:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2079) ~[?:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2060) ~[?:?]
    at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[?:?]
    at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[?:?]
    at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:56) ~[?:?]
    at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[?:?]
    at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1413) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:189) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[?:?]
    at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1391) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1384) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:132) ~[?:?]
    at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1362) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1268) ~[paper-1.18.1.jar:git-Paper-68]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.1.jar:git-Paper-68]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.IllegalArgumentException: Illegal group reference
    at java.util.regex.Matcher.appendExpandedReplacement(Matcher.java:1067) ~[?:?]
    at java.util.regex.Matcher.appendReplacement(Matcher.java:997) ~[?:?]
    at java.util.regex.Matcher.replaceAll(Matcher.java:1259) ~[?:?]
    at com.rezzedup.discordsrv.staffchat.util.MappedPlaceholder.update(MappedPlaceholder.java:56) ~[DiscordSRV-Staff-Chat-1.4.1.jar:?]
    at com.rezzedup.discordsrv.staffchat.MessageProcessor.sendFormattedChatMessage(MessageProcessor.java:75) ~[DiscordSRV-Staff-Chat-1.4.1.jar:?]
    at com.rezzedup.discordsrv.staffchat.MessageProcessor.processPlayerChat(MessageProcessor.java:178) ~[DiscordSRV-Staff-Chat-1.4.1.jar:?]
    at com.rezzedup.discordsrv.staffchat.StaffChatPlugin.submitMessageFromPlayer(StaffChatPlugin.java:228) ~[DiscordSRV-Staff-Chat-1.4.1.jar:?]
    at com.rezzedup.discordsrv.staffchat.commands.StaffChatCommand.onCommand(StaffChatCommand.java:53) ~[DiscordSRV-Staff-Chat-1.4.1.jar:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    ... 21 more
RezzedUp commented 2 years ago

Should be fixed now in 1.4.2.