how about adding more parities in the command part of Minecraft bedrock? That's right, I had an idea to manage messages that the player sends. Look:
---------------Example 1-----------------
/tellraw {"getMessage":[{"contains":{"value", "then":[{"replace":{"old value", "new value"}, {"sendMessage":True}], "else":[{"sendMessage":False}]}}]}
-----------------Example 2----------------
/tellraw {"getMessage":[{"startWith"{"ChangeCicleToDay", "then":[{"action":"/time set day"},{"sendMessage":False}]}}]}
-----------------Example 3----------------
/tellraw {"getMessage":[{"text":"/listMyScores", "then":[{"action":"/tellraw @s {"rawtext":[{"text":"your scores are..."}]}"},{"sendMessage":False}]}]}
Explaining: the "contains" component is used to identify whether the message has a string. And the "replace" serves to give a new value to an old value.
The "then" is used to run a task when the previous task returns true. And the "else" runs the task when it returns False.The "sendMessage" has the function of sending or not sending the player's message.
The "action" takes care of initiating a command.
So that was my tip. I hope you enjoyed. These components can be used a lot by map creators and add-ons: D
Please sign in to leave a comment.
0 Comments