ModsJava
SpigotJS
Java mod listed for Minecraft 1.9. Download on the author's site.
⬇ Download on SpigotA simple plugin that uses Nashorn to execute JavaScript code on your server.
Currently only dedicated functions for event and command handling have been added however if the community shows interest then the list of features will also expand.
Automated Reloading
spigot-js utilises Java's WatchService to automatically load scripts when they are created, scripts will also automatically be reloaded when changes are made as well as unloaded when the script file is deleted.
Event Handling
The events object contains the FQNs of all bukkit events, though you can also use a FQN as a string as the first parameter in the on function.
Command Handling
Here is an example of registering a command. Nashorn automatically maps the function to the corresponding functional interface enabling code that feels like regular JavaScript.
Plugin Integration
If anyone wishes for me to add specific plugin integration then please let me know via the issues page on the github repository and when I get the time I will see what I can do.
Currently only dedicated functions for event and command handling have been added however if the community shows interest then the list of features will also expand.
Automated Reloading
spigot-js utilises Java's WatchService to automatically load scripts when they are created, scripts will also automatically be reloaded when changes are made as well as unloaded when the script file is deleted.
Event Handling
Code (Text):
manager.on(events.PlayerJoinEvent, function(event) {
plugin.getLogger().info(event.getPlayer().getName() + " has joined");
});
plugin.getLogger().info(event.getPlayer().getName() + " has joined");
});
Command Handling
Code (Text):
manager.command("greet", function(sender, args) {
sender.sendMessage("Hello " + sender.getName());
});
sender.sendMessage("Hello " + sender.getName());
});
Plugin Integration
If anyone wishes for me to add specific plugin integration then please let me know via the issues page on the github repository and when I get the time I will see what I can do.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.9
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
SpigotJS is a free Minecraft Java mod. Compatible with Minecraft 1.9. Downloaded 182 times (via Spigot). Download it and open it directly in the game.