Skip to content

Commit ffa1dfa

Browse files
committed
Improve documentation of some boolean arguments
1 parent 0e7e453 commit ffa1dfa

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ public Integer[] numArgs() {
263263
@Override
264264
public String docs() {
265265
return "void {locationArray, data, [physics]} Sets the block at the location from a blockdata string."
266-
+ " Forward compatibility is not ensured.";
266+
+ " Forward compatibility is not ensured."
267+
+ " The physics boolean determines whether or not this causes a block update. Defaults to true.";
267268
}
268269

269270
@Override
@@ -379,7 +380,8 @@ public String docs() {
379380
return "void {locationArray, data, [physics]} Sets the block at the location from a blockdata object."
380381
+ " Blockdata can be an associative array or string format."
381382
+ " If an array, a 'block' key must exist with the block material."
382-
+ " All the other keys must be a blockstate and its value.";
383+
+ " All the other keys must be a blockstate and its value."
384+
+ " The physics boolean determines whether or not this causes a block update. Defaults to true.";
383385
}
384386

385387
@Override
@@ -3336,7 +3338,8 @@ public Boolean runAsync() {
33363338
public String docs() {
33373339
return "void {gatewayLocation, exitLocation, [exactTeleport]} Sets an end gateways teleport exit location."
33383340
+ " The exit location must be null or a location array with the same world as the end gateway."
3339-
+ " Optionally change whether the end gateway teleports to the exact location or finds a nearby one.";
3341+
+ " If exactTeleport is set to true, entities will teleport to the exit's exact block location."
3342+
+ " Otherwise a teleport location will be found near the exit location.";
33403343
}
33413344

33423345
@Override

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,8 +1016,7 @@ public String getName() {
10161016

10171017
@Override
10181018
public String docs() {
1019-
return "boolean {entityUUID} Returns whether the specified living entity will despawn."
1020-
+ " True means it will not.";
1019+
return "boolean {entityUUID} Returns whether a living entity will despawn when players are far enough away.";
10211020
}
10221021

10231022
@Override
@@ -1042,7 +1041,7 @@ public String getName() {
10421041

10431042
@Override
10441043
public String docs() {
1045-
return "void {entityUUID, boolean} Sets whether a living entity will despawn. True means it will not.";
1044+
return "void {entityUUID, boolean} Sets whether a living entity will despawn when players are far enough away.";
10461045
}
10471046

10481047
@Override

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ public Integer[] numArgs() {
231231
@Override
232232
public String docs() {
233233
return "string {[player], [dashless]} Returns the UUID of the current player or the specified player."
234+
+ " If dashless is set to true, the returned UUID format will not have any dashes."
234235
+ " This will attempt to find an offline player, but if that also fails,"
235236
+ " a PlayerOfflineException will be thrown. ---- It is not recommended to give this user input."
236237
+ " If the player is offline and hasn't visited the server recently (so that they're not in the"
@@ -7432,7 +7433,8 @@ public Integer[] numArgs() {
74327433

74337434
@Override
74347435
public String docs() {
7435-
return "void {[player], isVanished, otherPlayer} Sets the visibility of this player to another player.";
7436+
return "void {[player], isVanished, otherPlayer} Sets the visibility of this player to another player."
7437+
+ " If isVanished is true, the player's model and tablist name will not be visible to the other player.";
74367438
}
74377439

74387440
@Override

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,8 @@ public String docs() {
329329
return "boolean {specifier, [player], [force]} Opens a trading interface for the current player,"
330330
+ " or the one specified. Only one player can trade with a merchant at a time."
331331
+ " If the merchant is already being traded with, the function will do nothing."
332-
+ " When true, force will make the merchant trade with the player, closing the trade with"
333-
+ " the previous player if there was one. Function returns true if trading was successfully"
334-
+ " opened, and false if not.";
332+
+ " When force is set to true, this function will first close trading with any other player."
333+
+ " Function returns true if trading was successfully opened, and false if not.";
335334
}
336335
}
337336

0 commit comments

Comments
 (0)