How do I get the server to execute a command and render the result in the chat bar? #590
Unanswered
QiYiJun
asked this question in
Script-related questions
Replies: 1 comment
-
You would have to look at the code the command is calling and replicate that using some reflection. Commands return a number as a redstone output for command blocks and if it failed or not (0 failed, 1-15 redstone). The actual output is basically just chat messages. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As the title says. The script looks like this: Using
runCommad()
to ask the server to execute a command that the average player doesn't have access to, I had to ask the server to execute or else I had to turn on the cheat. This command/checkspawns legendary
is used to query the legendary mobs refresh time in the Pixelmon Mod, whereasrunCommad()
only return 1 and 0. I can't get the details of the output of the server console. So even if I render the chat bar withtell()
, it's just telling me a 1 or 0. How can I get the information of the console? Or do you have a better idea?Beta Was this translation helpful? Give feedback.
All reactions