
ChatEvents cause one NPE each, spamming the console
BlvckBytes opened this issue ยท 1 comments
Type of bug
Error in console
/ess dump all
output
https://essentialsx.net/dump.html?bytebin=qEgfUUpdvb
Error log (if applicable)
Bug description
Within one of the latest builds of EssentialsX, the PaperChatListenerProvider
has been introduced. It's handler onHighest
causes an obvious NullPointerException
, as follows: wrapping here creates a PaperChatEvent, whose format is suspiciously called fakeFormat
and remains null
, if not explicitly set - said format is not inherited from the wrapped instance. When passing this null
-value to the serializer here, it causes the internal NullPointerException
, as this parameter is expected to be non-null
.
Steps to reproduce
- Download and install the latest available builds of EssentialsX onto a Paper server
- Send any chat-message
- Notice the corresponding exception printed to the console
Expected behaviour
No exception caused, because there's either a null
-check introduced, or the format is simply inherited.
Actual behaviour
Console is spammed if players chat actively.
Additional Information
No response
Personally I couldn't reproduce this, and the chat format is actually set in PaperChatHandler
during the handleChatFormat
call. I made a change in #6067 that switches the type of map we use to store the in-transit events. Go ahead and try the latest build and let me know if you're still getting the error.