LuckPerms

LuckPerms

41.4k Downloads

Bring back actual usernames (not lowercased) when displaying info to the user

kmecpp opened this issue ยท 15 comments

commented

When running any LuckPerms command that outputs the name of a user its always lowercase now. This can be pretty annoying if we need the real version of their usernames for whatever reason like using it in another plugin or just to know what their actual username is.

Can we display the user's real names in commands again?

commented

Is this server offline mode? If not, it is irrelevant, because usernames in almost all (there are admittedly a couple of exceptions) situations can only have the one sequence of characters, uppercase or not?

commented

No, my server isn't in online mode and I wasn't even aware there could be multiple players with the same and different cased usernames (although that is another very important reason to implement this suggestion)

My only issue originally was just that it's annoying to go through that extra step of getting the getting the real username when I do need it, especially when I didn't used to have to do that extra step.

commented

This issue sounds completely unrelated to LuckPerms, you shouldn't need to rely on LP to get a user's proper username. LP is simply a permission plugin, not a username authentication plugin.

commented

Why does the capitalization matter in the first place? Usernames are not case sensitive.

commented

@Turbotailz Yes, I don't rely on LP to get the user's proper username but it's nice to have so I don't have to go through the extra step of getting it when I do need it. It's not an issue, I'm just saying for convenience it would be significantly better to display users' real names to someone executing LP commands.

@BrainStone One of the most common examples of when it matters are if there are other plugins which use case sensitive usernames to retrieve player data easily for a command sender providing a username. Previously I could just search for like all players in a certain group, get their exact usernames from LP and feed it into any other plugin but now I have to go through the extra step of getting the real username for each person before I can use it.

And even less functional but still important, its just nice to know player's actual usernames in general. For example, if I want to talk about one of the moderator's on my server to someone else, but I don't remember their exact usernames, I'm going look at the moderator list in LP, find their lowercase username but if I want to use their real username I still don't know it unless I go through the extra effort of finding it.

commented

LuckPerms always stored the usernames in lowercase.

commented

v4.3

image

commented

All usernames are converted to lowercase for certain datastores - it makes case insensitive lookups and queries much easier if all of the data is already in the same case.

Changing this isn't a high priority for me, sorry.

commented

Easy solution would be to just store both the lowercased name and actual cased name and use the lowercase one for lookups and regular one for displaying but I can understand if that's too much work if only one person is asking for it :(

commented

Easy solution

Absolutely not. Not even close

commented

Easy solution would be to just store both the lowercased name and actual cased name and use the lowercase one for lookups and regular one for displaying but I can understand if that's too much work if only one person is asking for it :(

Isn't it easier having every username in the same case instead of having to look players up with weird combinations of both upper and lower case?
Usernames aren't generally case sensitive anyway so I don't understand what the issue is.

commented

Easy solution

Absolutely not. Not even close

@BrainStone What about that is not easy besides a database schema change.

Easy solution would be to just store both the lowercased name and actual cased name and use the lowercase one for lookups and regular one for displaying but I can understand if that's too much work if only one person is asking for it :(

Isn't it easier having every username in the same case instead of having to look players up with weird combinations of both upper and lower case?
Usernames aren't generally case sensitive anyway so I don't understand what the issue is.

@Timmy109 That's what I'm suggesting? I'm saying keep case insensitive lookups but display the real usernames to players. And the case can matter if other plugins use case sensitive usernames, which a lot do.

commented

What about that is not easy besides a database schema change.

The database scheme change. In all storage types.

Also you clearly stated to store both the normal cased username and the lowercased username, not to just store the normal cased name and perform case insensitve lookups.

commented

What about that is not easy besides a database schema change.

The database scheme change. In all storage types.

Also you clearly stated to store both the normal cased username and the lowercased username, not to just store the normal cased name and perform case insensitve lookups.

Yes?

commented

You have to understand that LP as of now uses a unversioned database scheme. Reliably upgrading these is near impossible.

And your original solution suggested to add a second name column that keeps the capitalization. That's very impractical, It would make a lot more sense to just have the existing column not lowercase the strings and to compare case insensitive.