Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(1.19.1) Commands are now case-sensitive #8223

Closed
luizsusin opened this issue Aug 2, 2022 · 8 comments
Closed

(1.19.1) Commands are now case-sensitive #8223

luizsusin opened this issue Aug 2, 2022 · 8 comments
Labels
resolution: works as intended Working as it should / expected to type: bug Something doesn't work as it was intended to. upstream: bukkit Issues exists in Bukkit and/or CraftBukkit. version: 1.19 Game version 1.19

Comments

@luizsusin
Copy link

luizsusin commented Aug 2, 2022

Expected behavior

The Paper/Spigot command dispatcher should force commands to run as lower case.

Observed/Actual behavior

The command dispatcher is dispatching commands in the very same way they're inputted.

Steps/models to reproduce

  1. Run any command from the in-game chat in a case-sensitive way (something like /GaMeMode should do it);
  2. See the error message.

Important: Sending commands through the console will work, regardless the case pattern.

Plugin and Datapack List

It's not really relevant ATM, but I'll provide if necessary.

Paper version

git-Paper-101

Other

First of all, yes, I'm aware that Mojang possibly considers commands to be case-sensitive (as stated in this JIRA Issue).
This might also be an upstream issue (Spigot, possibly).

However, this behaviour has, for years, not been this way on Paper/Spigot.
It also doesn't really makes sense to me why two commands would be registered in different case patterns (in the same plugin or not).

For instance, /gamemode and /Gamemode should run exactly the same way, as they state the same thing (it's the same command). This problem is even worse when using short commands, like /g and /G, which can happen easily if you happen to leave your caps lock on accidentally.

Mojang has never made their server to be used with external commands, which helps explain why they actually don't care about case sensitiveness.

Although this is not really a bug, forcing commands to be lower-case seems so much like the appropriate way for the command dispatcher to work.

@luizsusin luizsusin added status: needs triage type: bug Something doesn't work as it was intended to. labels Aug 2, 2022
@Machine-Maker
Copy link
Member

Machine-Maker commented Aug 2, 2022

Yeah, so this is def an upstream thing. They made a significant change to command processing. I, however, am always in favor of lining up with vanilla more. This might be too big a behavior change to just say "Works as Intended" for Paper, but my first thought is to just say this is "WAI". Others will definitely chime in.

@Machine-Maker Machine-Maker added the upstream: bukkit Issues exists in Bukkit and/or CraftBukkit. label Aug 2, 2022
@luizsusin
Copy link
Author

Exactly, that's my point. I'm also always in favor of lining up with vanilla, however, this is, indeed, a really big behaviour change.
The community has been used for years to not really care about the case pattern, and the error message will first make pop the doubt if the command even exists in the server, and not the case pattern.
I'd really like to see at least an option to force or not the lower-case, but I think this might need some more discussion, which is why I brought it here.

@lynxplay
Copy link
Contributor

lynxplay commented Aug 5, 2022

I personally agree that this change is a rather large change to the current behaviour.
While I agree that, down the line, we would wanna move closer to vanilla and also follow the same case-sensitive matching, this should be something done on our own terms, with proper time for servers to adapt.

For now, I am marking this as a input wanted 👍

@lynxplay lynxplay added version: 1.19 Game version 1.19 and removed status: needs triage labels Aug 5, 2022
@lynxplay lynxplay moved this to needs-triage in Issues: Bugs Aug 5, 2022
@lynxplay lynxplay moved this from needs-triage to waiting-on-reporter in Issues: Bugs Aug 5, 2022
@lynxplay lynxplay moved this to needs-input in Issues: Bugs Aug 5, 2022
@lynxplay lynxplay moved this from waiting-for-reporter to needs-work in Issues: Bugs Aug 5, 2022
@codeHusky
Copy link

codeHusky commented Aug 10, 2022

IMO, there is no point in allowing commands to set aliases for different capitalizations of the same command, even if that is the current vanilla behavior. There is not a situation where, for instance, a player would want /WHISPER or /wHISPER to be different from /whisper, nor is there a reason why a moderator would want a hastily-written caps-locked /MUTE PLAYER3 to fail simply because the server is now on 1.19.1+.

There's also the potential case of a dev having camel-cased their plugin's commands in their plugin.yml with the assumption that "it doesn't matter because its case insensitive" and now having to push an update to workaround this new change to ensure a consistent user experience.

Many networks are also employing multiple different versions of Minecraft currently, so this would lead to a confusing situation where staff/players may think X command doesn't exist anymore because the command processor says "invalid command." I'd like to see someone can come up with a valid reason that all plugin-based commands should be subjected to this (rather than it being some sort of opt-in behavior).

I don't think there's any user benefit to align with Vanilla in this particular situation. I get the interest in following the philosophy of the Paper project here, but at the end of the day Paper provides a lot of QOL stuff that shouldn't be overlooked in this situation.

@electronicboy
Copy link
Member

This isn't really much of a "Do we wanna allow plugins to register "WhIsPeR and "WHISPER", that's 100% a stupid case for case sensitivity, this is pretty much purely a "do we wanna go through into the depths of hell to forcefully lowercase command dispatching, and modify all nodes registered into briadier, incurring the behavioural and maintenance debts which that incurs"; This does have some snags on both sides, on one side, people expect commands to "just work", but, it completely screws up on the client side given that the mismatch occurs and thus borks command completion; etc

I did hit a snag on this, which creates many issues as on the API side, the API still coerces stuff to lowercase on its side, and so you end up with stupid issues due to how broken upstream command situation is; e.g. command cooldown plugins generally expect to be able to lookup what command is being executed, and this creates issues when getCommand() returns a different result to executing (i.e. we successfully lookup a command due to coercion, but fail to execute due to brig dispatcher not doing that coercion)

I'm not 100% sure if we'll go into this, I see many merits for it but it's not free from issues, part of me semi wonders if mojang would take this up on their side given that there is 0 sane reason for case sensitivity here; We are likely going to need to touch some stuff on our side for things like the permission messages, but, I'm not sure how deep we should or will go into this

@Owen1212055
Copy link
Member

Being tracked under https://hub.spigotmc.org/jira/browse/SPIGOT-7149 as well

@Owen1212055
Copy link
Member

Looking at the upstream issue, it has been marked as won't fix.

This is intentional. As of 1.19.1, some commands (such as /say) have signed arguments that Bukkit does not have the ability to handle. Therefore player commands are handled with Minecraft's command system so that those types of messages can still be signed correctly.

Additionally, there is a mojira report which is also marked as won't fix/working as intended.
https://bugs.mojang.com/browse/MC-523

Is this a behavior change that paper wants to upkeep here? I'd say it's not worth unless officially implemented.

@Owen1212055
Copy link
Member

Closing this, as upstream has made it clear that this is a working as intended change.
Upkeeping this change is just too much of a behavior change compared to vanilla.

Because we are moving to use brig for command execution rather than spigot's system, hopefully we can see support for this in the future for plugin developers.

@Owen1212055 Owen1212055 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2022
@Owen1212055 Owen1212055 moved this to done in Issues: Bugs Sep 20, 2022
@Owen1212055 Owen1212055 added the resolution: works as intended Working as it should / expected to label Sep 20, 2022
@Machine-Maker Machine-Maker moved this from Done to Invalid in Issues: Bugs Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: works as intended Working as it should / expected to type: bug Something doesn't work as it was intended to. upstream: bukkit Issues exists in Bukkit and/or CraftBukkit. version: 1.19 Game version 1.19
Projects
Status: Invalid
Development

No branches or pull requests

6 participants