mojira.dev
MC-262910

op command text does not give error and turn red if entered text is invalid

Since Minecraft Java usernames cannot be shorter than 3 characters or longer than 16, an error should be given when typing the /op command with either of those parameters.

An error should also be given if special characters other than an underscore are entered.

Current Behavior

The commands

/op abcdefghijklmnopq
/op abcdefghijklmnopq
/op *$&$#
/op *$&$#

both output "That player does not exist" and the entered text in chat remains blue indicating there is no error.

Expected Behavior

To be clear I am referring to when you type out the player name after the command. Like in the image with /give, the text is red because that item is not valid. In the case of /op and /deop, if a name is 3-16 characters, I believe expected behavior is to have the coloring be blue, unless an invalid character is present in which case have it turn red with an error such as the one with /give. Otherwise have the coloring be red with an error.

Based on information here https://help.minecraft.net/hc/en-us/articles/4408950195341-Minecraft-Java-Edition-Username-VS-Gamertag-FAQ I would expect commands containing such criteria to give some sort of error while typing. Although the current error is technically correct in that the player indeed does not exist, it also cannot exist.

Since it is impossible to have such usernames, errors such as "Username cannot contain <character>." or "Username cannot be <shorter/longer> than <length>." would probably be expected behavior.

However, there do exist accounts with usernames shorter than 3 characters. such as X (probably created before the username limitations were introduced?) https://namemc.com/profile/X.1 , so implementing such behavior I have described would disallow making those accounts an operator (besides manually editing ops.json).

 

 

 

Attachments

Comments 1

Change request, not a bug. The game still behaves correctly in that it doesn't OP anything and throw an error. The error is even accurate (even if not detailed).

mattp12

(Unassigned)

Confirmed

Platform

Low

Commands

1.19.4, 1.20 Pre-release 5, 1.20 Pre-release 6, 1.20 Pre-release 7, 1.20 Release Candidate 1, ..., 25w02a, 25w03a, 25w04a, 25w05a, 25w06a

Retrieved