Grakkit - It's the fusion of GraalVM, JavaScript, and Minecraft.
If you want to get in touch with the community, join our discord server and we can assist you with whatever problem you may have.
Grakkit was designed to run on standard JDK, which means it comes pre-packaged with the GraalJS engine! This pre-packaged engine WILL conflict with the GraalVM JVM, so please use standard JDK to run servers running Grakkit!
Head on over to the releases page and grab the latest version for your platform. After that, just drop the JAR in whatever plugins, mods, or extensions folder you would install any other plugin, mod, or extension.
Upon starting or reloading the server with the plugin installed, the plugins/grakkit
folder will be created on your server. This is where most if not all development will take place, and serves as your home when working within the scope of grakkit.
Given that Grakkit is community-driven, there are tons of NPM modules you can install to add rich support and typings for the game. For now, the most widely-used package is @grakkit/stdlib-paper
, a standard library for JavaScript development with PaperMC servers. To install it, make sure you have NodeJS installed, then navigate to plugins/grakkit
in a terminal or command prompt and use npm install @grakkit/stdlib-paper
.
For those working on a remote server, you can simply install the package to a local directory, then copy that directory's contents to the remote server's plugins/grakkit
folder. This works because grakkit itself doesn't need NodeJS installed, it's merely the template used for package management.
Once that's done, you can import it from within your main file (default index.js
) as shown below...
const stdlib = require('@grakkit/stdlib-paper');
Upon the next server reload, the above code will be executed. Requiring this package also adds the in-game /js
command, which can be used to test and execute code from within the game -- for example, running /js self
will show a representation of the player or console sending the command, and you can use /js core.reload()
to reload the JS environment without having to reload the entire server.
Grakkit for Minestom is available as a standalone "extension." Download it from our latest release page. Make sure to download the correct platform, labeled grakkit-x.y.z.minestom.jar
.
The installation process and usage is very similar to that of bukkit/spigot/paper's, however the two key differences are a). it's an extension and should be placed in the extensions directory rather than plugins, and b). it uses different modules to complete the Environment™, notably-being @grakkit/stdlib-minestom
.
Grakkit for Minestom is still in its early days, however it's the best we've got as far as scripting in a performant environment like Minestom.
Grakkit is currently only available for servers implementing the Bukkit or Minestom's API. Check out Other Implementations to find alternatives for your platform!
For more info about Grakkit, modules, the JS command, and more, head on over to the wiki and read up. Attention: This wiki is slightly outdated and only applies to servers. Many of the code samples in here may still work, but some may not. Use at your own risk!
For another useful guide to getting started, check out Start Your Environment.
Additional documentation can be found at API.
For even more goodies, check out the #resources
or #showcase
channel in our Discord Server.
- LibsDisguises Integration
- PlaceholderApi Integration
- Open Villager Inventory
- Persisting block data in a chunk
Created by RepComm and spacefluff432. Maintained by brayjamin, MercerK, Mythical-Forest-Collective, spacefluff432, TonyGravagno, dustinlacewell, wagyourtail, and waterquarks.