I think Sponge needs a scripting language

While using Skript, lots of suggested features used to be rejected due to “Bukkit limitations.” I’m not an expert but an embedded and officially supported scripting language would be much more free.

Of course I want Skript to be ported, this is just a better option.

1 Like

I don’t think this would be used often enough. The people who are advanced enough to know how to use “super advanced” functions of the script that would be available if it were integrated with sponge would probably choose Java as their language of choice because scripting starts to become tedious the more advanced a plugin gets.

2 Likes

The same exact problem happens for Sponge too - Someone has to add API support for the event desired.

However adding to Bukkit was hard, and Sponge will be better than Bukkit in that regard, so if something is missing, the author of Skript or any one creating something similar can simply PR the changes needed to implement desired feature.

And as mentioned by @IDragonfire there is Nashorn/Rhino.

Someone could write something like Skript that interfaces Rhino/Nashorn and implements a cleaner API to loading scripts than raw Nashorn based JS.

Under this thread, it says that they will be porting over Skript, a bukkit scripting plugin.

I understand the appeal I don’t think this is a good idea. For one, Java is a fairly language easy to learn. Second, you aren’t dealing with a closed-source application that allow you to modify it’s behavior through simple scripts, you have access to a full API, use it.

I don’t want to be harsh but I’d rather have people learn to code before distributing something rather than making the task easier for amateurs. Just check the source code of many popular TOP100 Bukkit plugins, it’s only java and a lot of it is plain messy code. I can’t imagine the horror if you’d swing a scripting language in there. People would start posting bugs both for the API and the interpreter.

Okay, this is pseudocode. But if you have a language like that, it will be very messy. Also, I believe that if there is need for a scripting language, a plugin will be made. I do personally not support having all kinds of stuff that can be very case specific in Sponge. Pheraps that “language” you used there is what you like to use. Others may want LUA, or Javascript… Or pheraps even Python… Or they will also invent their own languages and want them to be supported. It is simply too specific. (and IMO very limited. Also, Java isn’t that hard…)

2 Likes

There are already multiple other languages that compile down to Java bytecode (Scala, Clojure, Ceylon, Kotlin) or have JVM dialects (Jython, JRuby).

I absolutely like the idea of allowing scripts as plugins, but I don’t think it should be integrated into sponge. Make a plugin that can handle ‘script plugins’, keep the sponge core clean and maintainable. ( KISS principle ftw!)

there is also this

http://www.oracle.com/technetwork/articles/java/jf14-nashorn-2126515.html
http://dev.bukkit.org/bukkit-plugins/scriptcraft/

you could use it to call bukkit methods from in game chat

2 Likes

I am surprised that nobody mentioned the CommandHelper plugin yet. Like its main developer said, “CommandHelper will follow whatever the majority support seems to be going towards, which will likely be whatever WE/WG are ported to.”

Oh god, another one :expressionless:

1 Like

It’s easy once you know it. New people will have a hard time grasping the concept of: event handlers, methods, classes, arguments, and types; which are all needed to send a message to a player on join.

Which is why they are meant for simple things. Eg. Skript

(Unless you count advanced scripting languages, LUA, Javascript/Typescript)

If you know Java, you will be able to adapt to the new libs without much problem, if you don’t it is worth learning java and learning how the platform works so that if you wan’t to do something advanced you can expand on your knowledge of Java rather than trying to learn it on the spot.

Other language support is planned. One of the languages mentioned is groovy.

I vote groovy.

or don’t be lazy and learn Java

Groovy doesn’t look like it would be too terrible to implement being kind of a cousin to java. That might work out.

I know Denizen (powerful scripting language for bukkit) plans to port to sponge once things settle down. But it is currently a plugin not built in.

1 Like

As @Iroh said, Denizen ( http://wiki.citizensnpcs.co/Denizen ), a powerful scripting engine, will be ported to Sponge. It won’t be built in to sponge (unless a Sponge dev approaches me about it, which they’re welcome to, it’s a useful idea).

[quote=“Guandor, post:21, topic:2065”]
lots of suggested features used to be rejected due to “Bukkit limitations.”
[/quote]That may be a problem for boring old Skript, but Denizen never let Bukkit limitations limit us. Denizen delves deep into NMS whenever needed to provide maximum power to the scriptor. The only limits are what the server is physically capable of doing.

What’s wrong with python or ruby?