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);
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=9e22aca9d446e07d5b89e41415ad2d42ad6b249e
|
||||
archash=6cf4a11de0770c3789face7fd32e3adee2b6792d
|
||||
|
||||
Reference in New Issue
Block a user