EssentialsX

EssentialsX

2M Downloads

Can't unban someone if they change their name since being banned.

mibby opened this issue ยท 19 comments

commented

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.

commented

"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.

commented

@Rave1996 your issue is because you are in offline mode.

@mibby what happens when you try to unban his old name? And what happens when you try to unban after he attempted to login (so the server knows of his new name)?

commented

@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.

commented

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?

commented

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.

commented

@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.

commented

@mibby You can use /pardon (or /minecraft:pardon if Essentials intercepts that as well) as an alternative.

commented

@drtshock, @vemacs Bump. Issue still exists, still not able to unban someone who has changed their name since being banned. =/

commented

@mibby Did you try /ess reload after unbanning, or use /minecraft:pardon?

commented

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.

commented

Bump.

commented

Bump - this has been an issue for over a year

commented

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.

commented

Just wanted to say that I also have this issue and would greatly appreciate a fix. :)

commented

I can confirm that this is still an issue, have had it happen several times

commented

Looks like the perfect issue to get back into plugin dev with. I'll investigate but hold off on self assigning.

commented

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

commented

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.

commented

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.