NPE generated by equals() in PlayerInfoData
Kamilkime opened this issue ยท 0 comments
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):
- Create a copy of the PlayerInfoData list taken from the packet
- 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:
Version Info
https://cdn.titanvale.net/hotlink-ok/PLib.txt