Blocking Event Actions
BlockingEventActions contains 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(boolean)- returns success if already matching; otherwise fails closed because the settings flow is not safely packet-wired here.
Behavior notes:
- This class intentionally does not store credentials and does not auto-login.
- In Gradle tests where RuneLite's injector is absent, client lookup fails closed with
CLIENT_NOT_READY. - Suite-wide account setup is owned by PacketUtils account bootstrap, not this helper. PacketUtils attempts fixed viewport, High Alchemy warning, and level-up-message settings before account automations run, and exposes the current step/failure through
PacketUtilsPluginstatus getters.
Tick Guard Example
Run blocker checks before normal automation. If a blocker is visible, handle it and skip the rest of the tick so the plugin does not queue 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(...) is intentionally conservative. Use it as a state check
and surface the failure to the operator if the current layout is incompatible.
PacketUtils has a separate bootstrap settings adapter for the fixed-mode setup
flow because that path needs live status logging and retry behavior on game
ticks.
if (!BlockingEventActions.isResizableViewport()) {
InteractionResult result = BlockingEventActions.setResizableMode(true);
if (result.failed()) {
log.debug("Manual viewport change required: {}", result.getMessage());
}
}