runeliteplus: fix warning being called for users who wont be using rsps

This commit is contained in:
Zeruth
2019-07-20 19:49:55 -04:00
parent a05455f6a5
commit 305fc56cd8
2 changed files with 11 additions and 0 deletions

View File

@@ -89,6 +89,7 @@ public class RuneLite
public static final File SCREENSHOT_DIR = new File(RUNELITE_DIR, "screenshots");
public static final File LOGS_DIR = new File(RUNELITE_DIR, "logs");
private static final RuneLiteSplashScreen splashScreen = new RuneLiteSplashScreen();
public static boolean allowPrivateServer = false;
@Getter
private static Injector injector;
@@ -181,6 +182,7 @@ public class RuneLite
parser.accepts("debug", "Show extra debugging output");
parser.accepts("no-splash", "Do not show the splash screen");
parser.accepts("local-injected", "Use local injected-client");
parser.accepts("private-server", "Use a custom codebase");
final ArgumentAcceptingOptionSpec<String> proxyInfo = parser
.accepts("proxy")
@@ -264,6 +266,11 @@ public class RuneLite
ClientLoader.useLocalInjected = true;
}
if (options.has("private-server"))
{
allowPrivateServer = true;
}
Thread.setDefaultUncaughtExceptionHandler((thread, throwable) ->
{
log.error("Uncaught exception:", throwable);

View File

@@ -30,6 +30,7 @@ import java.applet.AppletStub;
import java.net.MalformedURLException;
import java.net.URL;
import lombok.RequiredArgsConstructor;
import net.runelite.client.RuneLite;
import net.runelite.client.util.StringFileUtils;
@RequiredArgsConstructor
@@ -54,7 +55,10 @@ class RSAppletStub implements AppletStub
{
try
{
if (RuneLite.allowPrivateServer)
return new URL(StringFileUtils.readStringFromFile("./codebase"));
return new URL(config.getCodeBase());
}
catch (MalformedURLException ex)
{