Check if the widget is hidden in the event it still exists.

This commit is contained in:
Purps 2021-09-05 19:43:42 -04:00
parent 5ffd621be8
commit 836549cf5f
1 changed files with 3 additions and 1 deletions

View File

@ -58,7 +58,9 @@ public class BankUtils {
}
public boolean isOpen() {
return client.getWidget(WidgetInfo.BANK_ITEM_CONTAINER) != null;
Widget bankWidget = client.getWidget(WidgetInfo.BANK_ITEM_CONTAINER);
// When you close the bank manually with a hot-key, the widget is still active but hidden.
return bankWidget != null && !bankWidget.isHidden();
}
public void close() {