mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 18:57:32 +00:00
JS PARSER MK.I
This commit is contained in:
1 parent
6948690042
commit
79d1b74a0f
192 files changed
+8462
-14
No files matched your search
@@ -2331,6 +2331,26 @@ public class GuiScriptTextArea extends GuiNpcTextField {
|
||||
this.enableCodeHighlighting = true;
|
||||
this.container.formatCodeText();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the scripting language for syntax highlighting and type inference.
|
||||
* @param language The language name (e.g., "ECMAScript", "Groovy")
|
||||
*/
|
||||
public void setLanguage(String language) {
|
||||
if (this.container != null) {
|
||||
this.container.setLanguage(language);
|
||||
if (this.enableCodeHighlighting) {
|
||||
this.container.formatCodeText();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current scripting language.
|
||||
*/
|
||||
public String getLanguage() {
|
||||
return this.container != null ? this.container.getLanguage() : "ECMAScript";
|
||||
}
|
||||
|
||||
public void setListener(ITextChangeListener listener) {
|
||||
this.listener = listener;
|
||||
|
||||
Reference in new issue
Block a user