help command not suggesting tab completion when executed from other entity
The bug
Currently (1.9.1-pre3) running the /help command for other entities using the /execute command prints the help message for the player or command block running the /execute command. However, when doing this there is no TAB completion hint.
How to reproduce
- Run the following command
/help
You will see the TAB completion hint
- Place an ArmorStand
- Now execute the /help command from the ArmorStand
/execute @e[type=ArmorStand,c=1] ~ ~ ~ /help
You will see no TAB completion hint
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.CommandHelp.execute(MinecraftServer, ICommandSender, String[]) tests if the sender is a player. As TAB completion now works in command blocks as well, this test should probably be removed.
/** * Callback for when the command is executed * * @param server The Minecraft server instance * @param sender The source of the command invocation * @param args The arguments that were passed */ public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (sender instanceof CommandBlockBaseLogic) { //... } else { //... // Replaced this //if (k == 0 && sender instanceof EntityPlayer) if (k == 0) { TextComponentTranslation textcomponenttranslation2 = new TextComponentTranslation("commands.help.footer", new Object[0]); textcomponenttranslation2.getChatStyle().setColor(TextFormatting.GREEN); sender.addChatMessage(textcomponenttranslation2); } } }
Created Issue:
help command not suggesting tab completion when executed from other entity
The bug
Currently (1.9.1-pre3) running the /help command for other entities using the /execute command prints the help message for the player or command block running the /execute command. However, when doing this there is no TAB completion hint.
How to reproduce
- Run the following command
/helpYou will see the TAB completion hint
- Place an ArmorStand
- Now execute the /help command from the ArmorStand
/execute @e[type=ArmorStand,c=1] ~ ~ ~ /helpYou will see no TAB completion hint
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.CommandHelp.execute(MinecraftServer, ICommandSender, String[]) tests if the sender is a player. As TAB completion now works in command blocks as well, this test should probably be removed.
/** * Callback for when the command is executed * * @param server The Minecraft server instance * @param sender The source of the command invocation * @param args The arguments that were passed */ public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (sender instanceof CommandBlockBaseLogic) { //... } else { //... // Replaced this //if (k == 0 && sender instanceof EntityPlayer) if (k == 0) { TextComponentTranslation textcomponenttranslation2 = new TextComponentTranslation("commands.help.footer", new Object[0]); textcomponenttranslation2.getChatStyle().setColor(TextFormatting.GREEN); sender.addChatMessage(textcomponenttranslation2); } } }
A comment with security level 'global-moderators' was removed.


Why should an Armour stand being able to do a TAB completion ?
I don't recall /execute to be able to tab autocomplete the executed command
Attaching screenshots.
oh, like that
Thank you [Mod] redstonehelper
This is "Won't fix" for now because of
MC-69327.MC-69327is not about this exactly, but Searge's comment fits to both.You seem to have mis interperted the issue, look at the screenshots, it missing part of the message.
Ah, yes, you're right.
Not fixed.
Is fixed for me.
I'll make a video.
That video had nothing to do with this issue. :/
Ok, another video then.
[~FaRoGaming], this is not what this ticket is about.
Look in the screenshots, the executed help command was missing the green text on the bottom.
Aww, sorry, I seem to be a bit confused.