ProtocolLib

3M Downloads

PacketType.Status.Server.SERVER_INFO listeners not firing

LOOHP opened this issue ยท 4 comments

commented

Describe the bug
The following code never gets called despite clients pinging the server for status. (The packet itself did reach the client)

protocolManager.addPacketListener(new
 PacketAdapter(PacketAdapter.params().plugin(plugin).types(PacketType.Status.Server.SERVER_INFO)) {
            @Override
            public void onPacketSending(PacketEvent event) {
                   ...
            }
});

Expected behavior
Gets called whenever a server info response is sent to clients.

Version Info
dump-2022-06-10_13.48.17.txt

commented

btw WrappedServerPing should probably include the new "previewsChat" field.

commented

Will do, in a moment. Thanks

commented

I can confirm it is working, thanks for the quick fix!