* @param cached <tt>true</tt> to skip updating the inventory interface.
* @return the current inventory interface if available; otherwise null.
*/
public RSComponent getInterface(final boolean cached) {
if (methods.interfaces.get(INTERFACE_INVENTORY_BANK).isValid()) {
final RSComponent bankInv = methods.interfaces.getComponent(
INTERFACE_INVENTORY_BANK, 0);
if (bankInv != null && bankInv.getAbsoluteX() > 50) {
return bankInv;
}
}
if (methods.interfaces.get(INTERFACE_INVENTORY_DEPOSIT_BOX).isValid()) {
final RSComponent bankInv = methods.interfaces.getComponent(
INTERFACE_INVENTORY_DEPOSIT_BOX, 17);
if (bankInv != null && bankInv.getAbsoluteX() > 50) {
return bankInv;
}
}
if (methods.interfaces.get(INTERFACE_INVENTORY_SHOP).isValid()) {
final RSComponent shopInv = methods.interfaces.getComponent(
INTERFACE_INVENTORY_SHOP, 0);
if (shopInv != null && shopInv.getAbsoluteX() > 50) {
return shopInv;
}
}
if (methods.interfaces.get(INTERFACE_INVENTORY_PRICE_CHECK).isValid()) {
final RSComponent priceInv = methods.interfaces.getComponent(INTERFACE_INVENTORY_PRICE_CHECK, 0);
if (priceInv != null && priceInv.getAbsoluteX() > 50) {
return priceInv;
}
}
if (methods.interfaces.get(INTERFACE_INVENTORY_EQUIPMENT_BONUSES).isValid()) {
final RSComponent equipInv = methods.interfaces.getComponent(INTERFACE_INVENTORY_EQUIPMENT_BONUSES, 0);
if (equipInv != null && equipInv.getAbsoluteX() > 50) {
return equipInv;
}
}
if (methods.interfaces.get(INTERFACE_INVENTORY_DUNGEONEERING_SHOP).isValid()) {
final RSComponent dungInv = methods.interfaces.getComponent(INTERFACE_INVENTORY_DUNGEONEERING_SHOP, 0);
if (dungInv != null && dungInv.getAbsoluteX() > 50) {
return dungInv;
}
}
if (!cached && methods.game.getTab() != Game.Tab.INVENTORY) {