ProtocolLib

3M Downloads

NPE generated by equals() in PlayerInfoData

Kamilkime opened this issue ยท 0 comments

commented

Describe the bug
In the Player Info packet, when joining the server and adding the player - the display name might be null. But the equals() in PlayerInfoData - just uses displayName.equals(other.displayName), and so if the first displayName is null - we get a NPE.

To Reproduce
For example (in my random case):

  1. Create a copy of the PlayerInfoData list taken from the packet
  2. Try removing one of the items from the collection

Expected behavior
The possibly null displayName should be considered when doing equals()

Screenshots
Packet the server was trying to send, just after I joined:
obraz

Version Info
https://cdn.titanvale.net/hotlink-ok/PLib.txt