Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6be48ec

Browse files
committed
update DefaultFunction example
1 parent f7565d3 commit 6be48ec

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/skriptlang/skript/common/function/DefaultFunction.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* <p>
1212
* An example implementation is stated below.
1313
* <pre><code>
14-
* DefaultFunction.builder(addon, "floor", Long.class)
14+
* DefaultFunction<Long> function = DefaultFunction.builder(addon, "floor", Long.class)
1515
* .description("Rounds a number down.")
1616
* .examples("floor(2.34) = 2")
1717
* .since("3.0")
@@ -23,8 +23,9 @@
2323
* return l;
2424
*
2525
* return Math2.floor(((Number) value).doubleValue());
26-
* })
27-
* .register();
26+
* });
27+
*
28+
* Functions.register(function);
2829
* </code></pre>
2930
* </p>
3031
*

0 commit comments

Comments
 (0)