ProtocolLib

3M Downloads

can't listen pong packet

Yun-Shan opened this issue · 6 comments

commented

Follow this template except for feature requests. Use pastebin when providing /protocol dump and any relevant errors.

Make sure you've done the following:

  • You're using the latest build for your server version
  • This isn't an issue caused by another plugin
  • You've checked for duplicate issues
  • You didn't use /reload

Debug paste link:
in ProtocolLib-4.3.0 it will give an exception.
https://paste.md-5.net/iwojebiyuv.sql
in ProtocolLib-4.4.0 it won't listen pong packet.
https://paste.md-5.net/ucokuyicop.sql

Description and relevant errors:
i want to listen 'pong' packet but it can't. a easy way to reproduce the problem is to use command. /packet add status server pong
server version:
This server is running CraftBukkit version git-Spigot-dcd1643-e60fc34 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)

commented

Is your listener running async? Sometimes that can be the problem

commented

the problem will happen whether async or not.

commented

my English is very poor and i use Google Translate.

I just tested it again.

even i just only install ProtocolLib-4.4.0 without installing other plugins, and using packet add status server pong to listen 'pong' packet, the problem will also happen:
ProtocolLib did not print 'pong' packet(but if i also use packet add status server ping, the 'ping' packet will print normally), and client can not receive 'pong' packet(the signal icon is a × and does not display ping time), after i use packet remove status server pong client can disply signal normally.

commented

This bug occurred to me recently as well, I am able to consistently reproduce this issue with ProtocolLib versions 4.5.0, 4.5.1 and 4.6.0-SNAPSHOT on CraftBukkit version git-Spigot-db6de12-18fbb24 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT). Interestingly, only the pong packet seems to not be able to be handled correctly.

commented

Try making a packet listener for this with optionAsync

commented

Thanks, that was missing indeed... turns out I was too stupid to create an async listener the proper way 🤦