lenis0012 / LoginSecurity

Lightweight and secure user authentication for Bukkit Minecraft servers
https://www.spigotmc.org/resources/loginsecurity.19362/
Apache License 2.0
98 stars 84 forks source link

Players can't move on registration #316

Open SnoweFawkes opened 9 months ago

SnoweFawkes commented 9 months ago

Hi, i have this issue when someone joins for the first time in the server. They are not able to move, i don't know if the problem is this plugin but i have this error only when people joins for the first time. (when they rejoin they can)

[18:32:40 ERROR]: [LoginSecurity] Failed to save player location java.sql.SQLException: Failed set location id in profile at com.lenis0012.bukkit.loginsecurity.database.LocationRepository.insertLoginLocationBlocking(LocationRepository.java:57) ~[LoginSecurity-3.1.1-Bukkit.jar:?] at com.lenis0012.bukkit.loginsecurity.database.LocationRepository.lambda$insertLoginLocation$0(LocationRepository.java:26) ~[LoginSecurity-3.1.1-Bukkit.jar:?] at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.4.jar:git-Paper-449] at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.19.4.jar:git-Paper-449] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.19.4.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?]

I'm using Paper 1.19.4, Login security 3.2.0, and fast login.

lenis0012 commented 9 months ago

I think that the error is unrelated but it is still something I should fix. I will try to get a fix out later today. What's happening is that it has determined this player is not logged in so it sends them to the spawn and saves the original location in the database. The only problem is that this player is no registered so there is no profile to save to.

The correct thing for LoginSecurity to do here is nothing. because this player is not registered there is no point in overriding their spawn location. Shouldn't cause the issue you are having though.