mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
[BUGFIX] Resets out and err to solve issue #37
This commit is contained in:
@@ -20,6 +20,8 @@ import org.parabot.environment.servers.ServerProvider;
|
||||
import java.applet.Applet;
|
||||
import java.awt.Dimension;
|
||||
import java.io.File;
|
||||
import java.io.PrintStream;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.TimerTask;
|
||||
@@ -52,6 +54,9 @@ public class Context {
|
||||
private UlirathaClient ulirathaClient;
|
||||
private JSONParser jsonParser;
|
||||
|
||||
public static PrintStream defaultOut = System.out;
|
||||
public static PrintStream defaultErr = System.err;
|
||||
|
||||
private Context(final ServerProvider serverProvider) {
|
||||
threadGroups.put(Thread.currentThread().getThreadGroup(), this);
|
||||
|
||||
@@ -222,6 +227,9 @@ public class Context {
|
||||
Core.verbose("Done.");
|
||||
|
||||
BotDialog.getInstance().validate();
|
||||
|
||||
System.setOut(defaultOut);
|
||||
System.setErr(defaultErr);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -48,7 +48,6 @@ public class AddGetterAdapter implements Opcodes, Injectable {
|
||||
final ClassNode fieldLocation, final FieldNode fieldNode,
|
||||
final String methodName, final String returnDesc,
|
||||
final boolean staticMethod, final long multiplier) {
|
||||
System.out.println(fieldNode.name);
|
||||
this.into = into;
|
||||
this.fieldLocation = fieldLocation;
|
||||
this.fieldNode = fieldNode;
|
||||
|
||||
@@ -56,6 +56,7 @@ public class PublicServerExecuter extends ServerExecuter {
|
||||
serverProviderInfo.getCRC32() + ".jar");
|
||||
final String jarUrl = Configuration.GET_SERVER_PROVIDER
|
||||
+ this.serverName;
|
||||
System.out.println(jarUrl);
|
||||
|
||||
Core.verbose("Downloading: " + jarUrl + " ...");
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import org.parabot.core.parsers.randoms.RandomParser;
|
||||
import org.parabot.core.ui.components.PaintComponent;
|
||||
import org.parabot.environment.servers.ServerProvider;
|
||||
|
||||
import java.io.PrintStream;
|
||||
|
||||
/**
|
||||
*
|
||||
* Executes a server provider
|
||||
@@ -21,12 +23,6 @@ public abstract class ServerExecuter {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
try{
|
||||
org.parabot.environment.api.utils.WindowsPreferences.userRoot().remove("Software\\JavaSoft\\Prefs");
|
||||
}catch (Exception e){
|
||||
// Ikov likes to creates preference keys, doesn't it?
|
||||
}
|
||||
|
||||
Context context = Context.getInstance(provider);
|
||||
context.load();
|
||||
PaintComponent.getInstance().startPainting(context);
|
||||
|
||||
Reference in New Issue
Block a user