Player returns to death location when leaving server after dying
Tomi010817 opened this issue · 18 comments
Bug description:
When you die by any cause, and then you go to "Title screen" on the death screen that shows up, then join in again into the server, and succesfully log in, you literally revive in the same place.
My words to say:
I think its a bug because I don't find any node on the config file related to this. Already tested it on an empty server and it stills happening (I'm using the lastest version). This is a highly abusable bug, hope it gets fixed soon! Thanks for reading.
EDIT: The best way to solve this in my opinion, would be to save the death screen event and get it back to him after he succesfully logs in.
#2008
I see that not only I have a problem with it: Finally, I managed with the command: /authme resetpos at the respawn event, I don't remember anymore, hence I have spam in the logs and the command 2. unnecessarily called if only the authors did it differently.
I've been testing the resetpos command but, in conclusion, the best solution to that bug would be to give the player instantly the death screen after loging in (only when player logs out when he is dead and hasn't respawned), or to send him to the spawn after logging in if he has died and log out without respawning (because he quitted with the death screen panel), and also an option to directly send him to the "Essentials" spawn, since I'm already using the spawnpriority event for Authme, to send UnAuthedPlayers to the authme spawn that is located on a different map, to simulate it as an AuthLobby (to stop players from stealing base coords from others, and bots from spamming).
I've been testing the resetpos command but, in conclusion, the best solution to that bug would be to give the player instantly the death screen after loging in (only when player logs out when he is dead and hasn't respawned), or to send him to the spawn after logging in if he has died and log out without respawning (because he quitted with the death screen panel), and also an option to directly send him to the "Essentials" spawn, since I'm already using the spawnpriority event for Authme, to send UnAuthedPlayers to the authme spawn that is located on a different map, to simulate it as an AuthLobby (to stop players from stealing base coords from others, and bots from spamming).
Oh, I do not use bungeecord, I had to call resetpos because otherwise I could not get the effect that the player would not throw items on the spawn, only in the place where he died
Bump
Bug is still present to this day, easy fix would be to reset player position on every respawn event since even if a player leaves without respawning it still shows the death message upon rejoin
Well I found the issue but I'm WAAAAY too noob at Java to even touch this code ( I fear I would make a pasta mess! ). Here's what I found
In my minecraft server (Tuinity 1.16.5), the PlayerQuitEvent gets called AFTER a player's quit. This means that the player gets flagged both DEAD and OFFLINE, even if he was alive and online at the time of the quit
This mean that both terms of that if statement output complete garbage which does NOT correspond to the actual state of the player
I PR-ed a fix, I tested it and it works on my server.
EDIT: AuthMeReloaded does not have a concept of respawn so login location = respawn location. I would need to add a config, and a lot of stuff to let users choose priority, which i'm not gonna do for now.
Take this pr as a base for a bigger bug fix.
Kinda, but I'm already happy knowing that this issue is on the milestone, I know that sooner or later this is gonna be fixed.
Worst part is that this is actually an exploit, you can abuse this to get exp really fast since when you bypass your death screen with this, you still have your exp level and the exp that was dropped on the ground...
Nope.
We have to wait until they have the time to solve this issue.
The only way to solve it now, is by making a PR, if someone is interested to help.
@kingvonx as a temporarily easy fix, I suggest you to use this plugin to fix this bug.
https://bukkit.org/threads/instant-respawn-1-8-8.488974/