mojira.dev
MC-78779

commands with optional player argument have missing error translation in command blocks

The bug

When you enter this

/kill

command into a command block, it will give you this error message, regardless what language you selected (because it has no translation)

[15:40:45] You must specify which player you wish to perform this action on.

Affected commands

  • /achievement

  • /clear

  • /gamemode

  • /kill

  • /scoreboard teams (join and leave) (uses the same method but does not print the correct error message in command blocks for some reason)

  • /setworldspawn

  • /spawnpoint

  • /xp

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 method net.minecraft.command.CommandBase.getCommandSenderAsPlayer(ICommandSender) throws a PlayerNotFoundException with this error message (not a translation) if the sender is not a player.

Linked issues

Attachments

Comments 7

I can confirm that. It's probably something related to the command block engine, since that this message can only appear in command blocks.

Also, this and [MC-46341] can be linked as related.

Still in 1.9.1-pre3

Cannot confirm for 1.11. I can see for example the German translation as expected. @unknown, can you check and see if this is still an issue for you?

Looks like it is fixed, the translation string is commands.generic.player.unspecified

marcono1234

Erik Broes

Community Consensus

command, command_block, kill, translation

Minecraft 1.8.3, Minecraft 15w47c, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.4, Minecraft 16w21a, Minecraft 16w44a

Minecraft 1.11

Retrieved