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 SCREENSHOT_DIR = new File(RUNELITE_DIR, "screenshots");
|
||||||
public static final File LOGS_DIR = new File(RUNELITE_DIR, "logs");
|
public static final File LOGS_DIR = new File(RUNELITE_DIR, "logs");
|
||||||
private static final RuneLiteSplashScreen splashScreen = new RuneLiteSplashScreen();
|
private static final RuneLiteSplashScreen splashScreen = new RuneLiteSplashScreen();
|
||||||
|
public static boolean allowPrivateServer = false;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private static Injector injector;
|
private static Injector injector;
|
||||||
@@ -181,6 +182,7 @@ public class RuneLite
|
|||||||
parser.accepts("debug", "Show extra debugging output");
|
parser.accepts("debug", "Show extra debugging output");
|
||||||
parser.accepts("no-splash", "Do not show the splash screen");
|
parser.accepts("no-splash", "Do not show the splash screen");
|
||||||
parser.accepts("local-injected", "Use local injected-client");
|
parser.accepts("local-injected", "Use local injected-client");
|
||||||
|
parser.accepts("private-server", "Use a custom codebase");
|
||||||
|
|
||||||
final ArgumentAcceptingOptionSpec<String> proxyInfo = parser
|
final ArgumentAcceptingOptionSpec<String> proxyInfo = parser
|
||||||
.accepts("proxy")
|
.accepts("proxy")
|
||||||
@@ -264,6 +266,11 @@ public class RuneLite
|
|||||||
ClientLoader.useLocalInjected = true;
|
ClientLoader.useLocalInjected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.has("private-server"))
|
||||||
|
{
|
||||||
|
allowPrivateServer = true;
|
||||||
|
}
|
||||||
|
|
||||||
Thread.setDefaultUncaughtExceptionHandler((thread, throwable) ->
|
Thread.setDefaultUncaughtExceptionHandler((thread, throwable) ->
|
||||||
{
|
{
|
||||||
log.error("Uncaught exception:", throwable);
|
log.error("Uncaught exception:", throwable);
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import java.applet.AppletStub;
|
|||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import net.runelite.client.RuneLite;
|
||||||
import net.runelite.client.util.StringFileUtils;
|
import net.runelite.client.util.StringFileUtils;
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@@ -54,7 +55,10 @@ class RSAppletStub implements AppletStub
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (RuneLite.allowPrivateServer)
|
||||||
return new URL(StringFileUtils.readStringFromFile("./codebase"));
|
return new URL(StringFileUtils.readStringFromFile("./codebase"));
|
||||||
|
|
||||||
|
return new URL(config.getCodeBase());
|
||||||
}
|
}
|
||||||
catch (MalformedURLException ex)
|
catch (MalformedURLException ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user