package net.glowstone.scripty;

import javax.script.ScriptEngine;

public enum ScriptLanguage {
    JAVASCRIPT("JavaScript", "print(\"Hello, world!\")", "js"), PYTHON("Python", "print(\"Hello, world!\")", "js"), LUA("LUA", "print(\"Hello, world!\")", "lua");

    private final String name, sample;
    private final ScriptEngine engine;

    ScriptLanguage(String name, String sample, String extension) {
        this.name = name;
        this.sample = sample;
        this.engine = ScriptyMod.ENGINE_MANAGER.getEngineByExtension(extension);
        System.out.println("TEST> Engine exists for " + name + " -> " + (engine != null));
    }


    public String getName() {
        return name;
    }

    public String getSample() {
        return sample;
    }

    public ScriptEngine getEngine() {
        return engine;
    }
}

@@ -195,26 +195,26 @@
 orld!%5C%22)%22, %22
-js
+py
 %22), LUA(%22LUA

Fix incorrect python extension