Un-blacklisted arc.net
This commit is contained in:
@@ -23,7 +23,7 @@ import java.util.regex.*;
|
||||
public class Scripts implements Disposable{
|
||||
private final Seq<String> blacklist = Seq.with(".net.", "java.net", "files", "reflect", "javax", "rhino", "file", "channels", "jdk",
|
||||
"runtime", "util.os", "rmi", "security", "org.", "sun.", "beans", "sql", "http", "exec", "compiler", "process", "system",
|
||||
".awt", "socket", "classloader", "oracle", "invoke", "java.util.function", "java.util.stream", "org.", "arc.net");
|
||||
".awt", "socket", "classloader", "oracle", "invoke", "java.util.function", "java.util.stream", "org.");
|
||||
private final Seq<String> whitelist = Seq.with("mindustry.net", "netserver", "netclient", "com.sun.proxy.$proxy", "mindustry.gen.", "mindustry.logic.", "mindustry.async.", "saveio", "systemcursor");
|
||||
private final Context context;
|
||||
private final Scriptable scope;
|
||||
@@ -57,7 +57,7 @@ public class Scripts implements Disposable{
|
||||
public String runConsole(String text){
|
||||
try{
|
||||
Object o = context.evaluateString(scope, text, "console.js", 1, null);
|
||||
if(o instanceof NativeJavaObject) o = ((NativeJavaObject)o).unwrap();
|
||||
if(o instanceof NativeJavaObject n) o = n.unwrap();
|
||||
if(o instanceof Undefined) o = "undefined";
|
||||
return String.valueOf(o);
|
||||
}catch(Throwable t){
|
||||
|
||||
@@ -154,7 +154,7 @@ public class ModsDialog extends BaseDialog{
|
||||
|
||||
}
|
||||
});
|
||||
}, error -> Core.app.post(() -> ui.showException(error)));
|
||||
}, error -> Core.app.post(() -> modError(error)));
|
||||
}else{
|
||||
listener.get(modList);
|
||||
}
|
||||
@@ -405,7 +405,7 @@ public class ModsDialog extends BaseDialog{
|
||||
ObjectSet<String> installed = mods.list().map(m -> m.getRepo()).asSet();
|
||||
|
||||
browserTable.clear();
|
||||
browserTable.add("@loading");
|
||||
browserTable.add("@loading");1
|
||||
|
||||
int cols = (int)Math.max(Core.graphics.getWidth() / Scl.scl(480), 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user