jxpl
jxpl - The javax.scripting Plugin Loader
Latest release: r15 (click to download)
Git!
jxpl is a plugin providing a plugin loader that loads whatever script frameworks work with javax.script, and are Invocable.
End-user Usage: Place scripts in the scripts/ directory in the root directory (where plugins/ is). Do not place scripts in plugins/.
Developer Usage: Example scripts are lined below. It should contain everything you need to get started. jxpl comes with the latest version of Rhino shaded in the jar. Should you want to script using other languages (provided they work with ScriptEngineManager in javax.script), simply drop the JAR of the scripting engine into plugins/jxpl/lib/
.
Some available languages (and examples, if available):
-
JavaScript (example)
- Mozilla Rhino 1.7R3, included in jxpl
- Python 2.5 (Jython) (example): http://www.jython.org/downloads.html
- Ruby 1.9 (JRuby) (example): http://www.jruby.org/download
- Groovy: http://groovy.codehaus.org/Download
- Lua (JNLua): http://code.google.com/p/jnlua/downloads/list
For examples, see the language list above.
Resources:
- jxpl scripts repository
-
jxpl.command.js
- Provides
/jxpl load/reload
for on-the-fly script loading and reloading. Script unloading can be done by normal plugin unloading.
- Provides
Skript > dis plugin
@Tronnes
Jxpl is definitely less efficient but for small, simple tasks, the performance difference is negligble. I wrote most of my plugins in jxpl initially because I was more familiar with Javascript than Java, but now I've been slowly converting the heavier plugins to Java and we are seeing some performance gains because of it.
Is there any performance impact using JavaScript compared to an ordinary plugin? I'm thinking of using this to protect certain blocks in an adventure world I have set up.
I'll be updating this over the weekend, hopefully ASAP. Your scripts will need to be updated, but the functionality for the new events system is already there, I merely need to strip out the old code, so it shouldn't take very long.
Any plans to update for the latest RB? Any ideas for implementing events in the new event system?
Nice plugin. The current version (r14) is'nt working with the 1.1-R1 release. When do you plan to release a new version. Thanks.
@BenderBoy2000
That script is a WorldEdit script; it is not a jxpl script plugin. Go ask for help from WorldEdit.
yo can u maybe do a vid tut on this or just install instructions cus im trying to install "FAB.js" plugin and how do i install? im well confused! ty for ur time