@@ -177,6 +177,7 @@ public Boolean runAsync() {
177177 }
178178
179179 @ api (environments = {CommandHelperEnvironment .class })
180+ @ seealso (PlayerManagement .ptellraw .class )
180181 public static class tellraw extends AbstractFunction {
181182
182183 @ Override
@@ -221,10 +222,10 @@ public Integer[] numArgs() {
221222 @ Override
222223 public String docs () {
223224 return "void {[string selector], array raw} A thin wrapper around the tellraw command from console context,"
224- + " this simply passes the input to the command. The raw is passed in as a normal "
225- + " (possibly associative) array, and json encoded. No validation is done on the input, so the"
226- + " command may fail. If not provided, the selector defaults to @a. Do not use double quotes "
227- + " (smart string) when providing the selector. See {{function|ptellraw}} if you need player"
225+ + " this simply passes the input to the command. The raw is passed in as an array and json encoded. "
226+ + " No validation is done on the input, so the command may fail. "
227+ + " Do not use double quotes (smart string) when providing the selector. "
228+ + " If not provided, the selector defaults to @a . See {{function|ptellraw}} if you need player"
228229 + " context. ---- The specification of the array may change from version to version of Minecraft,"
229230 + " but is documented here https://minecraft.gamepedia.com/Commands#Raw_JSON_text."
230231 + " This function is simply written in terms of json_encode and runas, and is otherwise equivalent"
@@ -241,7 +242,10 @@ public ExampleScript[] examples() throws ConfigCompileException {
241242 return new ExampleScript [] {
242243 new ExampleScript ("Simple usage with a plain message" ,
243244 "tellraw(array('text': 'Hello World!'));" ,
244- "<<Would output the plain message to all players.>>" )
245+ "<<Would output the plain message to all players.>>" ),
246+ new ExampleScript ("Using a selector" ,
247+ "tellraw('@a[gamemode=spectator]', array('text': 'Hello World!'));" ,
248+ "<<Would output the message to all spectators.>>" )
245249 };
246250 }
247251
0 commit comments