Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ruviolence/graaljs-expansion
Expansion for PlaceholderAPI that adds a javascript placeholders running on the GraalVM's Polyglot engine.
https://github.com/ruviolence/graaljs-expansion
Last synced: about 1 month ago
JSON representation
Expansion for PlaceholderAPI that adds a javascript placeholders running on the GraalVM's Polyglot engine.
- Host: GitHub
- URL: https://github.com/ruviolence/graaljs-expansion
- Owner: ruViolence
- License: mit
- Created: 2021-10-24T14:04:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-02T08:47:06.000Z (over 1 year ago)
- Last Synced: 2023-07-02T09:27:41.141Z (over 1 year ago)
- Language: Java
- Homepage: https://api.extendedclip.com/expansions/graaljs/
- Size: 39.1 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GraalJS Expansion
A powerful and high-performance alternative to [Javascript](https://github.com/PlaceholderAPI/Javascript-Expansion)
extension which runs scripts on the [GraalVM](https://www.graalvm.org/javascript) Polyglot engine. This extension allows
you to code almost any kind of placeholders you want in javascript.# Installation
This extension uses the GraalVM Polyglot engine, which means that it will not work if the server is not running on
GraalVM JVM.To make the server run on the GraalVM JVM you first need to [download it from here](https://www.graalvm.org/downloads)
and unzip the archive wherever you want. Please note that since version 22.0 they dropped support of Java 8, so if you
need it, you need to download version 21.3.The next step is to edit your server startup file, replacing the usual word java with the path to java from your
unpacked GraalVM, like this:```shell
"path-to-graalvm-folder\bin\java" -jar spigot-server.jar
```In some cases GraalVM does not have a "JavaScript" language by default, so you need to install it as explained
[here](https://www.graalvm.org/22.2/reference-manual/graalvm-updater/#install-components-on-graalvm-community).That's it, your server will now run on the GraalVM JVM. You can start using this extension and coding your placeholders!
# Where the scripts are stored
The scripts are loaded from the `plugins/PlaceholderAPI/graaljsscripts` folder. On first use, this extension does not
create any example scripts in this folder. So you can get them from the `scripts` folder in this repository. Just put
some scripts in this folder, run the command `/placeholderapi reload` and this scripts will be loaded!