-
Notifications
You must be signed in to change notification settings - Fork 24
Home
JavaScript-Expansion is an expansion for the Spigot plugin PlaceholderAPI.
- Download the expansion from the eCloud page.
- Copy the expansion to the
/plugins/PlaceholderAPI/expansions/
folder. - Reload PlaceholderAPI with
/papi reload
- Download/make some scripts.
- Profit?
Aliases: javascriptexpansion
, jsexp
.
Commands require the permission node placeholderapi.js.admin
.
Usage (General):
-
/jsexpansion
- Display expansion info. -
/jsexpansion reload
- Reloads the expansion. This command is recommended over /papi reload because it does not interfere with PlaceholderAPI or reloading other expansions. -
/jsexpansion list
- Display loaded scripts.
Usage (Debug):
-
/jsexpansion parse [me/<player_name>] [code]
- Parse Javascript script locally -
/jsexpansion loaddata [script_name]
- Load all save data from file into cache -
/jsexpansion savedata [script_name]
- Save all data from cache to file
The following commands require the github_script_downloads
config option be set to true in the PlaceholderAPI config:
-
/jsexpansion git list
- Display the names of all available scripts from the Javascript Expansion Github. -
/jsexpansion git info <name>
- Display information on a script from our Github collection. -
/jsexpansion git download <name>
- Download a script from Github to your scripts folder.
All JS-Expansion configurations will be placed inside your PlaceholderAPI plugin's config.yml
The configuration will look like this:
javascript:
debug: false
github_script_downloads: false
argument_split: ','
use_quick_js: true
-
debug
- Enable/Disable debug messages printed on console -
github_script_downloads
- Enable this option for downloading scripts from Github. See more -
argument_split
- Specify symbol for splitting arguments, defaulting to,
if the specified splitting symbol is_
. See more -
use_quick_js
- Switch to the QuickJS engine. If disabled, nashorn will be used. Careful! QuickJS breaks on some platforms!
Want to try out some pre-made scripts from the community and see what the JavaScript Expansion can do?
All you have to do is enable the github_script_downloads
config option in the PlaceholderAPI config.yml.
From there use the 'git' subcommands to check out the scripts we have available in this repo.
If you would like to contribute, simply submit a PR with your script!