mirror of
https://github.com/PlaceholderAPI/Javascript-Expansion.git
synced 2025-05-24 20:02:44 +00:00
Updated Your First Script (markdown)
parent
4f85e1e70f
commit
6d50efe0ca
@ -14,14 +14,15 @@ helloWorld();
|
|||||||
|
|
||||||
As you can see, the scripts return one value.
|
As you can see, the scripts return one value.
|
||||||
|
|
||||||
**NOTE: ** Semicolons (`;`) are not required in JS language. However, this is required with multiple statements stacked in 1 line of script
|
**NOTE:** Semicolons (`;`) are not required in JS language. However, this is required with multiple statements stacked in 1 line of script
|
||||||
|
|
||||||
## Using Your Script
|
## Using Your Script
|
||||||
|
|
||||||
To use our hello_world script, first let's save the above as `hello_world.js` inside the `plugins/PlaceholderAPI/javascripts/` folder.
|
To use our hello_world script, first let's save the above as `hello_world.js` inside the `plugins/PlaceholderAPI/javascripts/` folder.
|
||||||
|
|
||||||
Next, add it to the `plugins/PlaceholderAPI/javascript_placeholders.yml` file so the expansion knows to load it!
|
Next, add it to the `plugins/PlaceholderAPI/javascript_placeholders.yml` file so the expansion knows to load it!
|
||||||
Specifying script engine is optional, as it will be defaulted to 'nashorn' if not initialized
|
|
||||||
|
**NOTE:** Specifying script engine is optional, as it will be defaulted to 'nashorn' if not initialized
|
||||||
|
|
||||||
```YAML
|
```YAML
|
||||||
hello_world:
|
hello_world:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user