NPE when replacing player var
TheosisOfficial opened this issue ยท 6 comments
I got this exception when joining and leaving my server quickly, but this is the first time it has happened after using the plugin for a while and I can't seem to reproduce it: https://pastebin.com/H7tX4u5c. I already contacted Paper to see if it was caused by a bug on their end but they said it was a bug with the plugin.
Output of /version:
[07.09 16:04:33] [Server] [INFO] This server is running Paper version git-Paper-251 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: 5960af9) [07.09 16:04:33] [Server] You are running the latest version [07.09 16:04:33] [Server] Previous versiongit-Paper-250 (MC: 1.17.1)
Hey, what variable are you using in regulars motd?
Edit: Has this happened multiple times already? Or was this the first time?
Hey, what variable are you using in regulars motd?
Edit: Has this happened multiple times already? Or was this the first time?
This was the first and only time this has happened. Here's my entire config.yml: https://pastebin.com/NYgPH0in
I have fully read the stack trace now, and I have a feeling what may have happened. The error occurred while trying to find and replace %player% . An old Bukkit API normally retrieves this from your server cache in case the player has been online a short to medium time ago. Otherwise, it calls Mojangs auth servers. I know you don't use %player%, but the code gets called nevertheless โ it just replaces nothing.
I feel like something broke here, and I don't think it's due to ServerlistMOTD (might be wrong, though). I can add a null check in the corresponding section to catch those cases.
Thanks for reporting! :)
PS: Was the motd correctly displayed when getting the error?
I have fully read the stack trace now, and I have a feeling what may have happened. The error occurred while trying to find and replace %player% . An old Bukkit API normally retrieves this from your server cache in case the player has been online a short to medium time ago. Otherwise, it calls Mojangs auth servers. I know you don't use %player%, but the code gets called nevertheless โ it just replaces nothing.
I feel like something broke here, and I don't think it's due to ServerlistMOTD (might be wrong, though). I can add a null check in the corresponding section to catch those cases.
Thanks for reporting! :)
PS: Was the motd correctly displayed when getting the error?
I'm honestly not certain, but if I was to guess, yes, because I think I would have noticed if it wasn't. Thanks for looking into this! :)
If you'd like to, you can check out the beta. I've included your feedback.
https://github.com/strumswell/ServerlistMOTD-X/releases/tag/X-2021-09-12-BETA
Not fixed as it seems. New conversation in #33