Can't unban someone if they change their name since being banned.
mibby opened this issue ยท 19 comments
If you ban someone and they change their name, you can't unban them.
I had a player that was banned 11 months ago. He changed his name since being banned and just recently appealed to be unbanned. When attempting to unban his new name, the output states his old name has been unbanned. (Assuming it is looking up last known name based on essentials file. Doing /seen on the new name says he was formerly known as the old name, so it looks up the correct user and is presumably linked by online uuid.) But his ban is still in effect and he isn't able to login. The ban isn't removed from the ban list json file.
I tried unbanning via UUID instead of name, but that did not work either. To unban players who change their name since being banned, I have to manually remove their ban from the json file.
"Same" bug using /tempban, if a banned user changes his name (for example Asd => asD), the ban is bypassed, and a new UUID is made for that player.
@drtshock Nothing happens. When I try to unban his old name, it outputs that he has been unbanned. But the ban is still in effect and listed in the json file. Same for when he tries to join, gets the output to his client saying that he is banned with the specified reason, and I try unbanning again post attempted login (assuming this is when the server would attach his new name to his old profile based on UUID). Doesn't get unbanned.
The only way as far as I can tell to unban players who have been banned but changed their name is to manually remove them from the ban list.
When you do /seen on his old name after it says it's been unbanned, what happens? Also what happens with /seen on his new name?
Still says he is banned, presumably because it didn't remove the UUID ban from the json file. Seen on the new name says he was formerly known as the old name.
@drtshock Any update to a fix for this? Have another player who submitted an appeal to be unbanned but can't be unbanned due to changing his name. :( Need to manually intervene in the ban file and restart the server to remove the ban.
@mibby You can use /pardon (or /minecraft:pardon if Essentials intercepts that as well) as an alternative.
@mibby Did you try /ess reload
after unbanning, or use /minecraft:pardon
?
Reloading after unbanning via Essential's unban functionality doesn't work. User's old name isn't removed from the ban file. /minecraft:pardon
does work, but this bug should be fixed in Essentials in my opinion.
I am seeing the opposite symptom. I cannot unban the old name, as listed in the json file, but unbanning the new name appears to work.
Just wanted to say that I also have this issue and would greatly appreciate a fix. :)
Looks like the perfect issue to get back into plugin dev with. I'll investigate but hold off on self assigning.
After some testing, I fail to see the bug here. This should be marked as working as intended - it's possible to unban using the new username. If someone could elaborate as to why this would be considered a bug, let me know :) @md678685
But it is also impossible to unban with the old username?
minecraft:pardon is the only way to unban them.
Unbanning with /unban {name/uuid/oldname} does not work.
Closing this, because in fact it should be addressed in the latest versions (of Spigot, not Essentials this time). I wrote an tested a patch that allows the ban list to use UUID, which fixes the issue of not being able to pardon players who have changed their name since last playing on the server. This was a problem in all banning plugins that used the vanilla ban list implementation provided by Bukkit.