Personally I'd really like to see this or some well supported and powerful alternative to Skript added. I'm a bit new to the Minehut community in general, but what's so bad about JavaScript? If it's about security, all that really needs to be done is simply writing a quick modification to some existing plugin such as ScriptCraft which disallows access to the file system assuming it allows for that at all. This would most likely be as simple as locating the APIs interfaced with JS code and changing several lines to throw an exception, return undefined, etc. I genuinely want to know what the argument is against allowing other languages when other languages can be so powerful for MC servers.
The first real argument I want to give is that, personally, I think Skript is extremely difficult to work with due to a lack of documentation. I couldn't find a clean way to simply override block drops, I had to implement my own block dropping code even though MC already handles all of this for you. That means I'd have to somehow implement fortune code into Skript if I wanted fortune to work like it does in game and that could be a monstrous task. Additionally, it doesn't seem to support functions, return arguments, etc. You have to basically hack this all in through weirdly scoped variables, creating impossible to execute commands and executing them, and generally just really frowned upon methods that no other language would allow for let alone support at all.
Here's an example. Let's say I want to define an internally used piece of code to check if a user is an admin in my game. In JavaScript I might have something like this:
const admins = []; // A list of administrator users
let giveAdmin = function(uuid) {
if (!admins.includes(uuid)) // Is uuid not in list?
admins.push(uuid); // Put uuid into admins list
};
let revokeAdmin = function(uuid) {
if (admins.includes(uuid)) // Is uuid in list?
admins.splice(admins.indexOf(uuid), 1)); // Remove uuid from list
};
let isAdmin = function(uuid) { // Checks if user is admin
return admins.includes(uuid); // Simply see if their uuid is in the list
};
This is extremely straight forward and every function and object used here is extremely well documented on sites such as mozilla's documentation site. If you're unaware of what Mozilla is, they develop the Firefox web browser. You could use this JS code for tons of things on virtually any modern OS and I wrote it in about 30 seconds.
For people who are better at Skript than me, what would be a non hacky way to implement this into Skript if there even is one?
My second argument is that SO many things can be transpiled into JS. JS can be implemented on virtually any OS in C/C++ code, C#, Java (not to be mistaken with JS!), and so many more. It's used almost everywhere. People have wrote JS engines in vanilla lua, python, JS itself. JS is an extremely widely used language and hundreds of thousands of websites now use JS server sided, not just on the webpage. Discord only supports writing bots in JS. You can find support for JS syntax pretty much anywhere. As far as I can tell, no programming language > Skript transpilers exist partially because its not very widely used by anyone and additionally it's not a fully featured language and should not be used like one.
My third argument is this. As someone who has been programming for almost 10 years now (I'm 16, almost 17, yes I have genuinely been programming for more than half of my life now) I can safely say that Skript is a terrible way to learn to program. It has absolutely terribly ambiguous syntax, other concepts cannot be applied to other languages, is hardly turing complete or at least makes it extremely difficult, and most pretty trivial tasks for MC or programming in general are insanely complicated or hacky due to Skript's syntax.
In conclusion, I hate Skript because of what it teaches and how hard it is to use concepts anywhere else or apply concepts from anywhere else. You might disagree with me and that's okay, but I can hardly use Skript with 9 and a half years of programming due to how utterly confusing it is compared to all other languages I've used. That most likely means I'm not Skript's demographic, but there is nothing for my demographic. Give me any other language interfaced to MC and I could be doing some insane stuff that I just can't do with Skript. Please Minehut staff, consider some plugin support for standard programming languages.