-
Bug
-
Resolution: Fixed
-
Minecraft 1.9.1 Pre-Release 3, Minecraft 16w33a, Minecraft 16w42a, Minecraft 1.12.2
-
Confirmed
The bug
Commands like /kill or /gamemode 1 will print an error message in command blocks saying that a player needs to be specified. However, this is not the case for /scoreboard teams join team and /scoreboard teams leave
How to reproduce
- Add a team
/scoreboard teams add testTeam
- Place a command block and enter the following command
/scoreboard teams join testTeam
- Power the command block
Instead of the error message "You must specify ..." it will print the syntax help.
The reason
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why this happens is because the method net.minecraft.command.server.CommandScoreboard.execute(MinecraftServer, ICommandSender, String[]) tests if the sender is a player which it should not do. Instead the method net.minecraft.command.CommandBase.getCommandSenderAsPlayer(ICommandSender) should be called which would then throw the exception.
- relates to
-
MC-78779 commands with optional player argument have missing error translation in command blocks
- Resolved