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