Skip to content

Commit bed97e6

Browse files
committed
Update tellraw docs
1 parent b7323b5 commit bed97e6

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/main/java/com/laytonsmith/core/functions/Echoes.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

src/main/java/com/laytonsmith/core/functions/PlayerManagement.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6175,6 +6175,7 @@ public Boolean runAsync() {
61756175
}
61766176

61776177
@api(environments = {CommandHelperEnvironment.class})
6178+
@seealso(Echoes.tellraw.class)
61786179
public static class ptellraw extends AbstractFunction {
61796180

61806181
@Override

0 commit comments

Comments
 (0)