runeliteplus: fix warning being called for users who wont be using rsps
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user