In Minecraft version 1.13.2, is it possible to command a block that asks the player what command they would like to trigger in the chat?

I'm making a teleport elevator command, where you can go in and select one of many levels. To save space and not have a button or sign for each level, I thought it could show the options in chat like, "[1] [2] [3]" symbolizing level 1, 2, 3 and so on.

So, is there a way to set a command block to ask the player through chat which command they would like to trigger by chat or any other space saving means?


Solution 1:

Yes, you can put a click event of type "run_command" into a tellraw text.
This has the problem that it runs commands with the player's permission level, so if you want that to execute commands with higher permission levels, you have to use /trigger and then let command blocks, functions, etc. run the command based on the score set by the trigger command.