Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Spigot + Nashorn
smrkn submitted a new resource:
SpigotJS - Spigot + Nashorn
Read more about this resource...
I'm wondering what the advantages of this are, if any? And what disadvantages there may be?
Disadvantages could be that it could be hard to trace errors without some poking around.
In the case of the usage of FQNs in the spigot-js plugin, vars, I simply provide an events object which uses the value of Class#getSimpleName mapped to the value of Class#getCanonicalName for user convenience. Nashorn does also provides some helper functions that also re-use FQNs, though in most cases these will only be functions that interact with java code.
Event handling for spigot-js is done in java code via the emit method of the ScriptInterface class, only simple iteration of a set of event consumers.
I'll have to write up some test cases just to see what performance is actually like once I've fleshed the project out a bit more.