Blocking Event Actions
Verification boundary
revision-sensitive RuneLite UI, packet, or in-game outcomes; treat those as live-client verification pending unless the page records direct evidence.
BlockingEventActions provides safe, non-credential blocker helpers.
Methods
isWelcomeScreenOpen()- checks the click-to-play/welcome screen widget.continueWelcomeScreen()- queues a click on the welcome screen when visible.continueDeathDialog()- delegates toDialogActions.continueSpace()when a continuable dialogue is open.isFixedViewport()/isResizableViewport()- layout visibility checks.setResizableMode(InteractionResult)- returns success if already matching. Otherwise, it fails closed because the settings flow lacks safe packet-wiring here.
Behavior notes:
- This class intentionally omits credentials and avoids auto-login.
- In Gradle tests missing RuneLite's injector, client lookup fails closed with
CLIENT_NOT_READY.
Tick Guard Example
Run blocker checks before normal automation. If a blocker appears, handle it and skip the rest of the tick to prevent queuing competing actions.
@Subscribe
public void onGameTick(GameTick event) {
if (BlockingEventActions.isWelcomeScreenOpen()) {
InteractionResult result = BlockingEventActions.continueWelcomeScreen();
if (result.failed()) {
log.debug("Welcome screen continue failed: {}", result.getMessage());
}
return;
}
InteractionResult deathDialog = BlockingEventActions.continueDeathDialog();
if (deathDialog.succeeded()) {
return;
}
runAutomationTick();
}
Viewport Checks
setResizableMode(...) acts conservatively. Use it as a state check and surface the failure to the operator if the current layout proves incompatible.
if (!BlockingEventActions.isResizableViewport()) {
InteractionResult result = BlockingEventActions.setResizableMode(true);
if (result.failed()) {
log.debug("Manual viewport change required: {}", result.getMessage());
}
}