YouHaveTrouble / CommandWhitelist

You decide what commands players can use or tab complete on your server!
GNU General Public License v2.0
207 stars 22 forks source link

CW + PLib + command /? = error #94

Closed 8MiYile closed 2 months ago

8MiYile commented 2 months ago

Describe the bug comand /? can get error

Expected behavior A clear and concise description of what you expected to happen.

To Reproduce just imput command /?

[23:49:04] [Netty Epoll Server IO #1/ERROR]: [CommandWhitelist] Unhandled exception occurred in onPacketReceiving(PacketEvent) for CommandWhitelist
java.util.regex.PatternSyntaxException: Dangling meta character '?' near index 0
?
^
    at java.util.regex.Pattern.error(Pattern.java:2204) ~[?:?]
    at java.util.regex.Pattern.sequence(Pattern.java:2379) ~[?:?]
    at java.util.regex.Pattern.expr(Pattern.java:2245) ~[?:?]
    at java.util.regex.Pattern.compile(Pattern.java:1945) ~[?:?]
    at java.util.regex.Pattern.<init>(Pattern.java:1576) ~[?:?]
    at java.util.regex.Pattern.compile(Pattern.java:1101) ~[?:?]
    at java.lang.String.replaceFirst(String.java:3025) ~[?:?]
    at eu.endermite.commandwhitelist.bukkit.listeners.protocollib.PacketCommandPreProcessListener$1.onPacketReceiving(PacketCommandPreProcessListener.java:40) ~[CommandWhitelist-Bukkit-2.10.0.jar:?]
    at com.comphenix.protocol.injector.SortedPacketListenerList.invokeReceivingListener(SortedPacketListenerList.java:122) ~[ProtocolLib.jar:?]
    at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketRecieving(SortedPacketListenerList.java:75) ~[ProtocolLib.jar:?]
    at com.comphenix.protocol.injector.PacketFilterManager.postPacketToListeners(PacketFilterManager.java:555) ~[ProtocolLib.jar:?]
    at com.comphenix.protocol.injector.PacketFilterManager.invokePacketReceiving(PacketFilterManager.java:519) ~[ProtocolLib.jar:?]
    at com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector.onPacketReceiving(NetworkManagerInjector.java:127) ~[ProtocolLib.jar:?]
    at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processInboundPacket(NettyChannelInjector.java:488) ~[ProtocolLib.jar:?]
    at com.comphenix.protocol.injector.netty.channel.InboundPacketInterceptor.channelRead(InboundPacketInterceptor.java:33) ~[ProtocolLib.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.handler.flush.FlushConsolidationHandler.channelRead(FlushConsolidationHandler.java:152) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
    at java.lang.Thread.run(Thread.java:1583) ~[?:?]
[23:49:04] [Netty Epoll Server IO #1/ERROR]: Parameters: 
  net.minecraft.network.protocol.game.PacketPlayInChat@56982b55[
    b=/?
  ]

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Paper 1.18.2 latest CommandWhitelist 2.10.0 ProtocolLib 5.2.0-SNAPSHOT-679

YouHaveTrouble commented 2 months ago

don't use protocollib if it causes problems for you. It's literally written out right above the option to enable it