mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 16:49:10 +00:00
Added Context#getUsername & Context#setUsername
This commit is contained in:
@@ -32,6 +32,7 @@ public class Context {
|
|||||||
private static ArrayList<Paintable> paintables = new ArrayList<Paintable>();
|
private static ArrayList<Paintable> paintables = new ArrayList<Paintable>();
|
||||||
|
|
||||||
private static Context instance;
|
private static Context instance;
|
||||||
|
private static String username;
|
||||||
|
|
||||||
public boolean added;
|
public boolean added;
|
||||||
private ASMClassLoader classLoader;
|
private ASMClassLoader classLoader;
|
||||||
@@ -320,4 +321,11 @@ public class Context {
|
|||||||
return this.randomHandler;
|
return this.randomHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setUsername(String username) {
|
||||||
|
Context.username = username;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.parabot.core.ui.components;
|
package org.parabot.core.ui.components;
|
||||||
|
|
||||||
|
import org.parabot.core.Context;
|
||||||
import org.parabot.core.Core;
|
import org.parabot.core.Core;
|
||||||
import org.parabot.core.forum.AccountManager;
|
import org.parabot.core.forum.AccountManager;
|
||||||
import org.parabot.core.forum.AccountManagerAccess;
|
import org.parabot.core.forum.AccountManagerAccess;
|
||||||
@@ -60,6 +61,7 @@ public class VerboseLoader extends JPanel implements ProgressListener {
|
|||||||
|
|
||||||
if(username != null && password != null) {
|
if(username != null && password != null) {
|
||||||
if(Core.inDebugMode() || manager.login(username, password)) {
|
if(Core.inDebugMode() || manager.login(username, password)) {
|
||||||
|
Context.setUsername(username);
|
||||||
currentState = STATE_SERVER_SELECT;
|
currentState = STATE_SERVER_SELECT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user