Error while initializing 1.19.3 server with latest dev build
DavidTs93 opened this issue ยท 0 comments
I registered a packet listener in my plugin for ClientboundPlayerInfoUpdatePacket
(=PacketType.Play.Server.PLAYER_INFO
in ProtocolLib) and I get the following error:
java.lang.IllegalStateException: Override onPacketSending to get notifcations of sent packets!
at com.comphenix.protocol.events.PacketAdapter.onPacketSending(PacketAdapter.java:241) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.SortedPacketListenerList.invokeSendingListener(SortedPacketListenerList.java:195) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:149) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.PacketFilterManager.postPacketToListeners(PacketFilterManager.java:547) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.PacketFilterManager.invokePacketSending(PacketFilterManager.java:521) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector.onPacketSending(NetworkManagerInjector.java:99) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processOutbound(NettyChannelInjector.java:571) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector$2.doProxyRunnable(NettyChannelInjector.java:472) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.proxyRunnable(NettyEventLoopProxy.java:43) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.execute(NettyEventLoopProxy.java:252) ~[ProtocolLib.jar:?]
at net.minecraft.network.Connection.sendPacket(Connection.java:430) ~[?:?]
at net.minecraft.network.Connection.processQueue(Connection.java:547) ~[?:?]
at net.minecraft.network.Connection.flushQueue(Connection.java:503) ~[?:?]
at net.minecraft.network.Connection.send(Connection.java:398) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:2248) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:2234) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.internalTeleport(ServerGamePacketListenerImpl.java:1869) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1620) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.3.jar:git-Purpur-1922]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1368) ~[purpur-1.19.3.jar:git-Purpur-1922]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[purpur-1.19.3.jar:git-Purpur-1922]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1345) ~[purpur-1.19.3.jar:git-Purpur-1922]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1338) ~[purpur-1.19.3.jar:git-Purpur-1922]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1416) ~[purpur-1.19.3.jar:git-Purpur-1922]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1194) ~[purpur-1.19.3.jar:git-Purpur-1922]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[purpur-1.19.3.jar:git-Purpur-1922]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
[18:22:12 ERROR]: Parameters:
net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket@4536443e[
a=[INITIALIZE_CHAT]
b=[b[profileId=6cb983b1-7129-4ff0-8b0b-0e64eb13716a, profile=com.mojang.authlib.GameProfile@685419cd[id=6cb983b1-7129-4ff0-8b0b-0e64eb13716a,name=DMan16,properties={textures=[com.mojang.authlib.properties.Property@631bd333]},legacy=false], listed=true, latency=0, gameMode=CREATIVE, displayName=null, chatSession=a[sessionId=49447b8b-0a06-488f-a7c2-08b05f31dd04, profilePublicKey=a[expiresAt=2023-03-11T14:37:44.251Z, key=Sun RSA public key, 2048 bits
params: null
modulus: 24009819664576347400505640963655733171554766262437384302113262615485421300855145643908868367502505342618192999921680928585364852670029351160688049094258241700884234355914416183655210152198511182486453860619400680155330234929192779057434226343940913240146222753444746617230644989289400399244235096657020352942957496868507251723974293762450523723779685254002800319858087820420314207148942823684076675766492923405782610671114634320308845848326491926918260629035252680374642754421279890847941351000004921923633903461013634311761856765176740111417911821339602535719967725878031189301758681739557797182478564459992769248699
public exponent: 65537, keySignature=[B@6a2fcfa6]]]]
]
My code:
manager.addPacketListener(new PacketAdapter(POPUtilsMain.getInstance(),ListenerPriority.HIGHEST,PacketType.Play.Server.PLAYER_INFO) {
@Override
public void onPacketReceiving(PacketEvent event) {
if (event.getPacketType() != PacketType.Play.Server.PLAYER_INFO) return;
Player player = event.getPlayer();
PacketContainer packet = event.getPacket();
Optional<Object> option1 = packet.getModifier().optionRead(0);
Optional<Object> option2 = packet.getModifier().optionRead(1);
if (option1.isEmpty() && option2.isEmpty()) broadcast("Nothing in the packet!");
else {
option1.ifPresent(o -> broadcast("Option 1 type: " + o.getClass().getName()));
option2.ifPresent(o -> broadcast("Option 2 type: " + o.getClass().getName()));
}
}
});
(broadcast just broadcasts the string)
Any idea how to solve this problem?
Additional info:
Server version: Purpur 1.19.3
ProtocolLib version: 5.0.0-SNAPSHOT-b614
Java: 17.0.6