IntellectualSites / PlotSquared

PlotSquared - Reinventing the plotworld
GNU General Public License v3.0
544 stars 740 forks source link

Player names should be case-insensitive #3448

Open QuickWrite opened 2 years ago

QuickWrite commented 2 years ago

What feature do you want to see added?

When a player writes /p v Notch then it should give the same result as /p v notch or /p v nOtCh (when you are quite adventurous). But now only /p v Notch would work.

Are there any alternatives?

Write the user names in case-sensitive.

Anything else?

Even though this is not the most important thing (as autocomplete exists) it can be sometimes quite annoying when the player names are case sensitive in commands like /plot visit <Name>. Then it says that the player does not exist even though the user is typing the "correct" name.

Many other plugins are very generous on how they are treating their names in the commands (sometimes even so much that you can write Notc and it would still find Notch) and so it can be sometimes very confusing for users that these things are quite different.

And Minecraft does not allow multiple names that are basically the same, but only the casing is different.

TNTUP commented 2 years ago

+1 for this feature, can't remember if it was possible before in v4

DevJoey commented 2 years ago

Yep it should be case insensitive

josephjthomas commented 2 years ago

Usernames are not case insensitive, why do you think they should be treated like that? If you're taking a look at the API implementation, you see, that Mojang enforces proper spelling, see https://api.mojang.com/users/profiles/minecraft/Famelek for example.

When a player writes /p v Notch then it should give the same result as /p v notch or /p v nOtCh (when you are quite adventurous).

Imagine the scenario when you actually have Notch and nOtCh on the server, differentiated by a separated authentication algorithm and with separate UUIDs. How would you determine the plot the user is teleported to without storing magic meta for another level of authentication abstraction.

DevJoey commented 2 years ago

In a normal environment it is not possible to have 2 users with the same name! So a config option to enable caseinsensitive player search will not be the the problem and easy to implement.

If you have bedrock support on your server that allows duplicate names but with diffrent captitalisation you can disable it!

There is absolutely no reason for not allowing caseinsensitive search. It is not possible in java edition to have same name! And if you allow hacky bedrock players on your JAVA EDITION server, the caseinsensitive search can be turned off.

josephjthomas commented 2 years ago

In a normal environment it is not possible to have 2 users with the same name!

I'm not sure what you mean by 'In a normal enviroment'. You can have the same name multiple times on an instance. An example case is UUID assignment based on precompiled patterns. This is a common technique for many years.

If you have bedrock support on your server that allows duplicate names but with diffrent captitalisation you can disable it!

There is absolutely no reason for not allowing caseinsensitive search. It is not possible in java edition to have same name! And if you allow hacky bedrock players on your JAVA EDITION server, the caseinsensitive search can be turned off.

You missed my point. Case [in]sensitivity does not imply that names are equal, nor does bedrock matter, but it's good to note that bedrock with floodgate and geyser rule a fair part of the market.

QuickWrite commented 2 years ago

Usernames are not case insensitive, why do you think they should be treated like that? If you're taking a look at the API implementation, you see, that Mojang enforces proper spelling, see https://api.mojang.com/users/profiles/minecraft/Famelek for example.

I never said that they are case insensitive per se. I just said that Mojang does not allow multiple names with the same letters, but just the casing is different. It is something different.

So when you are reading something like this, please read it fully.

Imagine the scenario when you actually have Notch and nOtCh on the server, differentiated by a separated authentication algorithm and with separate UUIDs. How would you determine the plot the user is teleported to without storing magic meta for another level of authentication abstraction.

You'll never have that scenario when you are using Mojangs authentication servers as you cannot have the name nOtCh as the name Notch is already taken. And when you are using multiple authentication servers you know what you are doing.

iLemon commented 2 years ago

My players are reporting this as a bug. Apparently it used to work fine but now it requires them to type names case-sensitive.

MrClean1337 commented 2 years ago

For Geyser users it should be added as soon as possible. It is a disaster for mobile users.