[BUG]: NullPointerException when joining for the first time
pauloantoniassi opened this issue · 1 comments
TNE Version
v0.1.1.16
Spigot Version
1.19.4
Your config.yml
Your latest server log
What modules are you using?
No response
What part of TNE is the bug affecting?
Won't Startup, Transactions
Is your server using online mode?
Yes
Bug description
The error occurs when the user has never been seen by the plugin. The first time a user logs on the server the error appears on the console and the user can't execute any TNE actions until re-join the server (which fixes the issue).
It might be related to/caused by the FastLogin+AuthMe. It looks like the TNE is trying to read user data before it's available, causing a NullPointer, which blocks the user from executing any other command in-game.
If that is correct, I would suggest a super-simple hotfix: adding a try/catch with a one-time delayed retry. Probably there are better ways to fix this.
Note: This server uses FastLogin+AuthMe to allow mixed offline+online players.
How to reproduce
Server: Paper 1.19.4, build 521
Plugin: TNE v0.1.1.16
Java: 17.0.7
Plugins that might be related: FastLogin (v1.12), AuthMe (v5.6.0), AuthMeVelocity (v4.0.1)
Server in Offline mode (online users auth using FastLogin)
- In a new, clean server, add the plugin;
- Join the server;
- NullPointer should be logged on the server console.
I don't provide support to servers that authorize a form of cracked accounts on them. Mostly just a morals thing, but also it's unreliable for reproduction. If someone wants to dig into it and provide a PR that is fine.