Skip to content

Commit d97c4b5

Browse files
committed
Fix some documentation
1 parent a278c72 commit d97c4b5

File tree

7 files changed

+15
-19
lines changed

7 files changed

+15
-19
lines changed

src/main/java/com/laytonsmith/abstraction/enums/MCBiomeType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static MCBiomeType valueOfVanillaType(MCVanillaBiomeType type) {
4141
}
4242

4343
/**
44-
* @return Names of available entity types
44+
* @return Names of available biome types
4545
*/
4646
public static Set<String> types() {
4747
if(NULL == null) { // docs mode
@@ -55,7 +55,7 @@ public static Set<String> types() {
5555
}
5656

5757
/**
58-
* @return Our own EntityType list
58+
* @return Our own MCBiomeType list
5959
*/
6060
public static Collection<MCBiomeType> values() {
6161
if(NULL == null) { // docs mode

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,7 @@ public String docs() {
16121612
+ " first. Note that the reason this function is an in place sort instead of explicitly cloning the"
16131613
+ " array is because in most cases, you may not need to actually clone the array, an expensive"
16141614
+ " operation. Due to this, it has slightly different behavior than array_normalize, which could"
1615-
+ " have also been implemented in place. ---- If the sortType is a closure, it will perform a"
1615+
+ " have also been implemented in place.\n\nIf the sortType is a closure, it will perform a"
16161616
+ " custom sort type, and the array may contain any values, including sub array values. The closure"
16171617
+ " should accept two values, @left and @right, and should return true if the left value is larger"
16181618
+ " than the right, and false if the left value is smaller than the right, and null if they are"

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -540,13 +540,8 @@ public Integer[] numArgs() {
540540
@Override
541541
public String docs() {
542542
return "boolean {plaintext, hash} Checks to see if this plaintext password does in fact hash to the hash"
543-
+ " specified. Unlike md5 or sha1, simply comparing hashes won't work. Consider the following"
544-
+ " usage:\n"
545-
+ "string @plain = 'plaintext';\n"
546-
+ "string @hash = bcrypt(@plain);\n"
547-
+ "msg(if(check_bcrypt(@plain, @hash),"
548-
+ " 'They match!', 'They do not match!'));\n"
549-
+ "\n\nThis function is aware of and compatible with secure_string.";
543+
+ " specified. Unlike md5 or sha1, simply comparing hashes won't work."
544+
+ " This function is aware of and compatible with secure_string.";
550545
}
551546

552547
@Override

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4031,7 +4031,7 @@ public ExampleScript[] examples() throws ConfigCompileException {
40314031
+ "_testWithMutable(@a); // This will actually change the value\n"
40324032
+ "msg(@a); // Here, the value is 5\n"
40334033
+ "_testWithoutMutable(@a); // This will not change the value\n"
4034-
+ "msg(@a); // Still teh value is 5\n"),
4034+
+ "msg(@a); // Still the value is 5\n"),
40354035
new ExampleScript("Basic usage with closure", "@a = mutable_primitive(0);\n"
40364036
+ "execute(closure(){\n"
40374037
+ "\t@a++;\n"

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,8 +1050,7 @@ public String docs() {
10501050
+ " be a single player or an array of players to play the sound to, if"
10511051
+ " not given, all players can potentially hear it. ---- Possible categories: "
10521052
+ StringUtils.Join(MCSoundCategory.values(), ", ", ", or ", " or ") + "."
1053-
+ " ---- Possible sounds: "
1054-
+ StringUtils.Join(MCSound.types(), ", ", ", or ", " or ");
1053+
+ " \nPossible sounds: " + StringUtils.Join(MCSound.types(), "\n");
10551054
}
10561055

10571056
@Override

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public Integer[] numArgs() {
221221
@Override
222222
public String docs() {
223223
Set<Class<? extends CREThrowable>> e = ClassDiscovery.getDefaultInstance().loadClassesWithAnnotationThatExtend(typeof.class, CREThrowable.class);
224-
String exceptions = "\nValid Exceptions: ";
224+
String exceptions = "\n";
225225
List<String> ee = new ArrayList<>();
226226
for(Class<? extends CREThrowable> c : e) {
227227
String exceptionType = c.getAnnotation(typeof.class).value();
@@ -230,8 +230,10 @@ public String docs() {
230230
Collections.sort(ee);
231231
exceptions += StringUtils.Join(ee, ", ", ", and ");
232232

233-
return "nothing {exceptionType, msg, [causedBy] | exception} This function causes an exception to be thrown. exceptionType may be any valid exception type."
234-
+ "\n\nThe core exception types are: " + exceptions + "\n\nThere may be other exception types as well, refer to the documentation of any extensions you have installed.";
233+
return "nothing {exceptionType, msg, [causedBy] | exception} This function causes an exception to be thrown."
234+
+ " The exceptionType may be any valid exception type."
235+
+ "\n\nThe core exception types are: " + exceptions
236+
+ "\n\nThere may be other exception types as well, refer to the documentation of any extensions you have installed.";
235237
}
236238

237239
@Override

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public String docs() {
8484
+ " ingredients: Ingredients array of the recipe. See examples. (shaped and shapeless recipes)\n"
8585
+ " input: The input item array of the recipe. (furnace recipes)"
8686
+ " </pre>"
87-
+ " ---- Shaped Recipe. Turns 9 stone into obsidian."
87+
+ " Shaped Recipe. Turns 9 stone into obsidian."
8888
+ " <pre>"
8989
+ "{\n"
9090
+ " key: 'stone_to_obsidian',"
@@ -94,7 +94,7 @@ public String docs() {
9494
+ " ingredients: {A: {name: STONE}}\n"
9595
+ "}"
9696
+ "</pre>"
97-
+ " ---- Shapeless Recipe. Combines tall grass and dirt to make grass."
97+
+ " Shapeless Recipe. Combines tall grass and dirt to make grass."
9898
+ "<pre>"
9999
+ "{\n"
100100
+ " key: 'dirt_to_grass',"
@@ -103,7 +103,7 @@ public String docs() {
103103
+ " ingredients: {{name: 'DIRT'}, {name: 'LONG_GRASS', data: 1}}\n"
104104
+ "}"
105105
+ "</pre>"
106-
+ " ---- Furnace Recipe. Turns grass into dirt through smelting."
106+
+ " Furnace Recipe. Turns grass into dirt through smelting."
107107
+ " <pre>"
108108
+ "{\n"
109109
+ " type: 'FURNACE',\n"

0 commit comments

Comments
 (0)