runelite: add --disable-update-check
This commit is contained in:
@@ -35,10 +35,15 @@ import net.runelite.http.api.updatecheck.UpdateCheckClient;
|
||||
@Slf4j
|
||||
public class ClientLoader
|
||||
{
|
||||
public Optional<Applet> loadRs()
|
||||
public Optional<Applet> loadRs(boolean disableUpdateCheck)
|
||||
{
|
||||
final UpdateCheckClient updateCheck = new UpdateCheckClient();
|
||||
boolean isOutdated = updateCheck.isOutdated();
|
||||
boolean isOutdated = false;
|
||||
|
||||
if (!disableUpdateCheck)
|
||||
{
|
||||
final UpdateCheckClient updateCheck = new UpdateCheckClient();
|
||||
isOutdated = updateCheck.isOutdated();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -122,6 +122,7 @@ public class RuneLite
|
||||
parser.accepts("developer-mode");
|
||||
parser.accepts("no-rs");
|
||||
parser.accepts("debug");
|
||||
parser.accepts("disable-update-check");
|
||||
setOptions(parser.parse(args));
|
||||
|
||||
PROFILES_DIR.mkdirs();
|
||||
@@ -143,8 +144,9 @@ public class RuneLite
|
||||
{
|
||||
// Load RuneLite or Vanilla client
|
||||
final boolean hasRs = !getOptions().has("no-rs");
|
||||
final boolean disableUpdateCheck = getOptions().has("disable-update-check");
|
||||
final Optional<Applet> optionalClient = hasRs
|
||||
? new ClientLoader().loadRs()
|
||||
? new ClientLoader().loadRs(disableUpdateCheck)
|
||||
: Optional.empty();
|
||||
|
||||
if (!optionalClient.isPresent() && hasRs)
|
||||
|
||||
Reference in New Issue
Block a user