Class Bank
- java.lang.Object
- 
- org.dreambot.api.methods.container.impl.bank.Bank
 
- 
 public class Bank extends java.lang.Object
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaddToBankHistoryCache(@NonNull Item item)This allows you to add an item to the bank history cache, it should only be necessary if you're doing things outside our API.static @NonNull java.util.List<@Nullable Item>all()Gets the items in your bankstatic @NonNull java.util.List<Item>all(@NonNull Filter<Item> filter)A list of all the non-null items that match the given filter Filters out null before checking against the filterstatic intavailableTabs()Gets the number of tabs currently availablestatic @NonNull java.awt.RectanglecalculateSlotPosition(int slot)Gets the virtual position for the specified slot.static intcapacity()Gets the bank's max capacitystatic booleanclose()Exits the bank with the close button.static booleancontains(int id)Checks if the bank contains the given ID Placeholders are ignoredstatic booleancontains(int[] ids)static booleancontains(@NonNull java.lang.Integer... ids)Checks if your collection contains at least one item which meets one of the specified ids.static booleancontains(@NonNull java.lang.Object o)Checks to see if the bank contains an item matching the given Object Placeholders are ignoredstatic booleancontains(@NonNull java.lang.String string)Determines if bank contains an item that matches the given name.static booleancontains(@NonNull java.lang.String... names)Checks if your collection contains at least one item which meets one of the specified names.static booleancontains(@NonNull Filter<Item> filter)Checks if your collection contains at least one item which meets the specified filter.static booleancontainsAll(int[] ids)static booleancontainsAll(@NonNull java.lang.Integer... ids)Checks if your Bank contains all of the items with specified IDs Placeholders are ignoredstatic booleancontainsAll(@NonNull java.lang.String... names)Checks if your Bank contains all of the items with names specified Placeholders are ignoredstatic booleancontainsAll(@NonNull java.util.Collection<?> collection)Checks if your bank contains all of the items in the collectionstatic intcount(int id)Count of all the items that match the search.static intcount(int[] ids)static intcount(@NonNull java.lang.Integer... ids)Count of all the items that match the search.static intcount(@NonNull java.lang.String name)Count of all the items that match the search.static intcount(@NonNull java.lang.String... names)Count of all the items that match the search.static intcount(@NonNull BankTab tab)Gets the Item count for the BankTabstatic intcount(@NonNull Filter<Item> filter)Count of all the items that match the search.static booleandeposit(int id)static booleandeposit(int id, int amount)static booleandeposit(@NonNull java.lang.String name)static booleandeposit(@NonNull java.lang.String name, int amount)static booleandeposit(@NonNull Filter<Item> filter)static booleandeposit(@NonNull Filter<Item> filter, int amount)Deposits the first item that matches the givenFilterfor the given amountstatic booleandeposit(@NonNull Item item)static booleandeposit(@NonNull Item item, int amount)static booleandepositAll(int id)static booleandepositAll(@NonNull java.lang.String name)static booleandepositAll(@NonNull Filter<Item> filter)static booleandepositAll(@NonNull Item item)static booleandepositAllEquipment()Deposits all worn equipment with the deposit all equipment button.static booleandepositAllExcept(int[] ids)static booleandepositAllExcept(@NonNull java.lang.Integer... ids)static booleandepositAllExcept(@NonNull java.lang.String... names)static booleandepositAllExcept(@NonNull Filter<Item> filter)Deposits all items that do not match the givenFilterWill calldepositAllItems()if your inventory does not contain any of the given filter (nothing to exclude)static booleandepositAllItems()Deposits all items in your inventory with the deposit all button.static booleandrag(int fromSlot, int toSlot)Drags the item from one slot to another, either of which can be empty to simply move an item from one slot to the otherstatic intemptySlotCount()Number of slots that do not contain an item or placeholderstatic @NonNull java.util.List<Item>except(@NonNull Filter<Item> filter)Get all items which do not fit the given criteria.static intfullSlotCount()Number of slots that contain non-null items Includes placeholders as a full slotstatic @Nullable Itemget(int id)Gets the first item with the given idstatic @Nullable Itemget(int[] ids)Seeget(Integer...)static @Nullable Itemget(@NonNull java.lang.Integer... ids)Gets the first Item that matches one of the given idsstatic @Nullable Itemget(@NonNull java.lang.String name)Get the item for specified name.static @Nullable Itemget(@NonNull java.lang.String... names)Gets the first item that matches one of the given namesstatic @Nullable Itemget(Filter<Item> filter)static @NonNull java.util.List<@Nullable Item>getBankHistoryCache()Gets the bank item history cache.static @Nullable WidgetChildgetChild(int id)Gets theWidgetChildof theItemwith the given IDstatic @Nullable WidgetChildgetChild(@NonNull java.lang.String name)Gets theWidgetChildof theItemwith the given namestatic @Nullable WidgetChildgetChild(@NonNull Filter<Item> filter)static @Nullable WidgetChildgetChild(@NonNull Item item)Gets theWidgetChildof theItembased on the item's slot valuestatic @Nullable WidgetChildgetChildForSlot(int slot)Gets the WidgetChild for the given slotstatic @Nullable EntitygetClosestBank(@NonNull BankType type)Gets the nearest bank interactable based on BankTypestatic @Nullable BankLocationgetClosestBankLocation()Get the closest bank location.static @Nullable BankLocationgetClosestBankLocation(boolean includeTeleports)Gets the nearest bank location seeBankLocation.getNearest(Tile, boolean)static @Nullable BankTabgetCurrentBankTab()Gets the currentBankTabstatic intgetCurrentTab()Gets the current tab that is openstatic intgetCustomWithdrawAmount()static @NonNull BankQuantitySelectiongetDefaultQuantity()Gets the currently selected default quantity for withdraw or deposit actionsstatic intgetFirstEmptySlot()Gets the first empty slot in the bank.static intgetFirstFullSlot()Gets the next full slot in your bankstatic intgetIdForSlot(int slot)Gets the ID of theItemin the slot.static @Nullable ItemgetItemInSlot(int slot)Gets item in specified slot.static longgetLastBankHistoryCacheTick()Returns the last game tick (usingClient.getGameTick()) of a cache updatestatic longgetLastBankHistoryCacheTime()Returns the last timestamp (using System#currentTimeMillis) of a cache updatestatic java.lang.StringgetNameForSlot(int slot)Gets the Name for the Item in the slot.static @NonNull BankModegetRearrangeMode()Gets the current rearrange mode type;static intgetRow(@NonNull Item item)Gets the row of theItemstatic intgetScrollHeight()Determines the current scroll position height of the bank's scroll container.static intgetSlot(int id)Gets the slot for the item with specified ID.static intgetSlot(@NonNull java.lang.String name)Gets the slot for the item with specified name.static intgetSlot(@NonNull Filter<Item> filter)Gets the slot for the first item that matches the given filterstatic intgetTab(int slot)static intgetTab(@NonNull Item item)Gets the tab for theItemstatic @NonNull BankModegetWithdrawMode()Gets the current withdrawBankModestatic booleanisAlwaysOpenTab()static booleanisCached()Checks if the bank has been cached.static booleanisEmpty()Checks if the bank is empty (including placeholders)static booleanisFull()Determines if bank is full.static booleanisLoaded()Checks to see if the Bank container has been loaded successfully at least once Check is done duringall()callstatic booleanisOpen()Checks if the bank is currently open or not.static booleanisSlotEmpty(int slot)Checks if the given slot contains an itemstatic booleanisSlotFull(int slot)Checks if the slot has an Item in itstatic booleanisSlotVisible(@NonNull Item item)Determines if the givenItem's slot is visiblestatic booleanneedToScroll(@NonNull Item item)Determines if the bot needs to scroll to find theItemstatic booleanneedToScrollDown(@NonNull Item item)Determines if it needs to scroll down for theItemto be visiblestatic booleanneedToScrollUp(@NonNull Item item)Determines if it needs to scroll up in order to see the givenItemstatic booleanonlyContains(int[] ids)static booleanonlyContains(@NonNull java.lang.Integer... ids)Checks if your Bank only contains items with the specified IDsstatic booleanonlyContains(@NonNull java.lang.String... names)Checks if your Bank only contains items with specified namesstatic booleanonlyContains(@NonNull Filter<Item> f)Checks if your Bank only contains items that match the Filterstatic booleanopen()Finds the nearest BankType and attempts to open it.static booleanopen(@Nullable BankLocation bank)Opens a specific bank location, if you're not in the area it will call walk(Tile) and return false If given a null bank location, it will verify the nearest bank type's location (if we have it) If that verification fails, it will recalculate to find the nearest valid bank location.static booleanopenTab(int tab)Opens the bank tab specifiedstatic booleanopenTab(@NonNull BankTab tab)Opens theBankTabspecified.static booleanplaceHoldersEnabled()Checks whether placeholders are currently enabledstatic voidresetCache()This will reset the bank history cache to it's initial statestatic booleanscroll(int id)Scrolls to the item with the given ID seescroll(int, BankScroll)with a random choice of scroll typesstatic booleanscroll(int id, @NonNull BankScroll type)Scrolls to the item with the given ID using theBankScrollscroll typestatic booleanscroll(@NonNull java.lang.String name)Scrolls to the item with the given name seescroll(String, BankScroll)with a randomBankScrolltypestatic booleanscroll(@NonNull java.lang.String name, @NonNull BankScroll type)Scrolls to the item with the given name using the givenBankScrolltypestatic booleanscroll(@NonNull Filter<Item> filter)Scrolls to the item which matches the given filter.static booleanscroll(@NonNull Filter<Item> filter, @NonNull BankScroll type)Scrolls to the item which matches the given filter using the givenBankScrolltypestatic @Nullable Itemset(int index, @Nullable Item element)Sets anItemto the given slot Used internally, shouldn't really be touched by API usersstatic voidsetAlwaysOpenTab(boolean alwaysOpenTab)static booleansetDefaultQuantity(@NonNull BankQuantitySelection selection)Sets theBankQuantitySelectionfor bank actionsstatic booleansetRearrangeMode(@NonNull BankMode mode)Sets the Rearrange mode for the bank eitherBankMode.SWAPorBankMode.INSERTstatic voidsetUseBankHistoryCache(boolean useCache)Set whether our methods use the Bank cache if you call a method while not in the bankstatic booleansetWithdrawMode(@NonNull BankMode mode)Sets the withdraw mode, eitherBankMode.ITEMorBankMode.NOTEstatic intsize()Deprecated.seefullSlotCount()static intslot(int id)Deprecated.seegetSlot(int)static intslot(@NonNull java.lang.String name)Deprecated.seegetSlot(String)static intslot(@NonNull Filter<Item> filter)Deprecated.seegetSlot(Filter)static @Nullable java.awt.RectangleslotBounds(int slot)Gets the bounds of a slotstatic @Nullable java.awt.RectangleslotBounds(@NonNull Item item)CallsslotBounds(int)withItem.getSlot()If Item is null returns null Rectanglestatic booleanslotContains(int slot, int[] ids)static booleanslotContains(int slot, @NonNull java.lang.Integer... ids)Checks if the slot contains an item with an ID matching one of the given idsstatic booleanslotContains(int slot, @NonNull java.lang.String... names)Checks if the slot contains items that matches the given names.static booleanslotContains(int slot, @NonNull Filter<Item> filter)Checks if the slot contains an item that matches the filter.static booleanslotContains(int slot, @NonNull Item t)Checks if the slot contains givenItemstatic booleanslotNameContains(int slot, @NonNull java.lang.String sub)Checks if the slot has an item whose name contains the given sub stringstatic inttabContainerWidgetId()Gets the ID of theWidgetChildfor the tab containerstatic booleantogglePlaceholders(boolean enabled)Toggles whether placeholders are enabled or notstatic voidupdateCache()Used for updating the bank cache, generally reserved for internal use but can be called in a script during custom banking This will clear the bank cache and update it with all bank itemsstatic voidupdateCache(@NonNull java.util.Collection<Item> items)Clears the bank history cache and fills it with the given collection of items, only works if bank is openstatic intwidgetChildId()Gets the ID of theWidgetChildfor the bank interfacestatic intwidgetParentId()Gets the ID of theWidgetfor the bankstatic booleanwithdraw(int id)Withdraws one of the given item idstatic booleanwithdraw(int id, int amount)Withdraws an item for the id and amount given.static booleanwithdraw(@NonNull Filter<Item> filter)Withdraws one item that matches the givenFilterstatic booleanwithdraw(@NonNull Filter<Item> filter, int amount)Withdraws an item that matches the givenFilterfor the given amount For withdraw All-but-one pass in value: -9411static booleanwithdraw(java.lang.String name)Withdraws one of an item with the given namestatic booleanwithdraw(java.lang.String name, int amount)Withdraws an item for the name and amount given.static booleanwithdrawAll(int id)Withdraws all of an item for a given IDstatic booleanwithdrawAll(@NonNull Filter<Item> filter)Withdraws all of an item that matches the givenFilterstatic booleanwithdrawAll(java.lang.String name)Withdraws all of an item for the given name
 
- 
- 
- 
Method Detail- 
widgetParentIdpublic static int widgetParentId() Gets the ID of theWidgetfor the bank
 - 
widgetChildIdpublic static int widgetChildId() Gets the ID of theWidgetChildfor the bank interface- Returns:
 
 - 
tabContainerWidgetIdpublic static int tabContainerWidgetId() Gets the ID of theWidgetChildfor the tab container
 - 
capacitypublic static int capacity() Gets the bank's max capacity- Returns:
- constant value (currently 1220)
 
 - 
setUseBankHistoryCachepublic static void setUseBankHistoryCache(boolean useCache) Set whether our methods use the Bank cache if you call a method while not in the bank- Parameters:
- useCache- true (default) if you want to use the cache if available, false otherwise
 
 - 
allpublic static @NonNull java.util.List<@Nullable Item> all() Gets the items in your bank- Returns:
- list of all unfiltered items in your bank - this includes null items
 
 - 
isLoadedpublic static boolean isLoaded() Checks to see if the Bank container has been loaded successfully at least once Check is done duringall()call- Returns:
- True if the bank container has been loaded successfully once
 
 - 
calculateSlotPositionpublic static @NonNull java.awt.Rectangle calculateSlotPosition(int slot) Gets the virtual position for the specified slot.- Parameters:
- slot- The slot to find the position for.
- Returns:
- The rectangle object of the slot.
 
 - 
resetCachepublic static void resetCache() This will reset the bank history cache to it's initial state
 - 
isOpenpublic static boolean isOpen() Checks if the bank is currently open or not.- Returns:
- True if bank interface is open, else False
 
 - 
getClosestBankpublic static @Nullable Entity getClosestBank(@NonNull BankType type) Gets the nearest bank interactable based on BankType- Parameters:
- type- bank type to look for
- Returns:
- entity of closest bank object, null if no recognized bank type
 
 - 
openpublic static boolean open() Finds the nearest BankType and attempts to open it. This method will walk one step towards the nearest available BankLocation (getClosestBankLocation()) if there isn't a local bank entity.- Returns:
- true if the bank opens successfully, otherwise false
 
 - 
openpublic static boolean open(@Nullable BankLocation bank) Opens a specific bank location, if you're not in the area it will call walk(Tile) and return false If given a null bank location, it will verify the nearest bank type's location (if we have it) If that verification fails, it will recalculate to find the nearest valid bank location.- Parameters:
- bank- BankLocation that you want to open/go to, give null if you want it to just find the nearest loaded BankType
- Returns:
- True if opens successfully, else false
 
 - 
getClosestBankLocationpublic static @Nullable BankLocation getClosestBankLocation() Get the closest bank location. Does not include teleports in this calculation- Returns:
- the bank location closest to your player.
 
 - 
getClosestBankLocationpublic static @Nullable BankLocation getClosestBankLocation(boolean includeTeleports) Gets the nearest bank location seeBankLocation.getNearest(Tile, boolean)- Parameters:
- includeTeleports- whether to include use of teleports in inventory/equipment when calculating closest bank
- Returns:
- Closest bank location
 
 - 
withdrawpublic static boolean withdraw(int id) Withdraws one of the given item id- Parameters:
- id- The id of the item to withdraw.
- Returns:
- True if interaction was successful, else False
 
 - 
withdrawAllpublic static boolean withdrawAll(int id) Withdraws all of an item for a given ID- Parameters:
- id- The id of the item to withdraw.
- Returns:
- True if interaction was successful, else False
 
 - 
withdrawpublic static boolean withdraw(int id, int amount)Withdraws an item for the id and amount given.- Parameters:
- id- The id of the item to withdraw.
- amount- The amount to withdraw.
- Returns:
- True if interaction was successful, else False
 
 - 
withdrawpublic static boolean withdraw(java.lang.String name) Withdraws one of an item with the given name- Parameters:
- name- The name of the item to withdraw, case-insensitive.
- Returns:
- True if interaction was successful, else False
 
 - 
withdrawpublic static boolean withdraw(java.lang.String name, int amount)Withdraws an item for the name and amount given.- Parameters:
- name- The name of the item to withdraw, case-insensitive
- amount- The amount to withdraw.
- Returns:
- True if interaction was successful, else False
 
 - 
withdrawAllpublic static boolean withdrawAll(java.lang.String name) Withdraws all of an item for the given name- Parameters:
- name- The name of the item to withdraw, case-insensitive.
- Returns:
- True if interaction was successful, else False
 
 - 
withdrawpublic static boolean withdraw(@NonNull Filter<Item> filter) Withdraws one item that matches the givenFilter- Parameters:
- filter- The filter to match the item against
- Returns:
- True if interaction was successful, else False
 
 - 
withdrawAllpublic static boolean withdrawAll(@NonNull Filter<Item> filter) Withdraws all of an item that matches the givenFilter- Parameters:
- filter- The filter to match the item against
- Returns:
- True if interaction was successful, else False
 
 - 
withdrawpublic static boolean withdraw(@NonNull Filter<Item> filter, int amount) Withdraws an item that matches the givenFilterfor the given amount For withdraw All-but-one pass in value: -9411- Parameters:
- filter- The filter to match the item against
- amount- The amount to withdraw.
- Returns:
- True if interaction was successful, else False
 
 - 
depositAllItemspublic static boolean depositAllItems() Deposits all items in your inventory with the deposit all button.
 - 
depositAllEquipmentpublic static boolean depositAllEquipment() Deposits all worn equipment with the deposit all equipment button.
 - 
depositpublic static boolean deposit(@NonNull Filter<Item> filter, int amount) Deposits the first item that matches the givenFilterfor the given amount- Parameters:
- filter- The filter to match the item against
- amount- The amount of the item to deposit.
- Returns:
- True if deposit success, else False
 
 - 
depositAllExceptpublic static boolean depositAllExcept(@NonNull Filter<Item> filter) Deposits all items that do not match the givenFilterWill calldepositAllItems()if your inventory does not contain any of the given filter (nothing to exclude)- Parameters:
- filter- Filter to exclude from the deposit all iterations
- Returns:
- True if all items that don't match the given filter are deposited
 
 - 
closepublic static boolean close() Exits the bank with the close button. If Esc Interface Closing is enabled, it will close with the ESC key SeeClientSettings.isEscInterfaceClosingEnabled()- Returns:
- True if bank is already closed, or if the bank is successfully closed, else false
 
 - 
getCurrentTabpublic static int getCurrentTab() Gets the current tab that is open- Returns:
- Integer value of the current tab, -1 if one isn't open or found
 
 - 
slotBoundspublic static @Nullable java.awt.Rectangle slotBounds(int slot) Gets the bounds of a slot- Parameters:
- slot- Slot to get bounds of
- Returns:
- Rectangle of the slot
 
 - 
slotBoundspublic static @Nullable java.awt.Rectangle slotBounds(@NonNull Item item) CallsslotBounds(int)withItem.getSlot()If Item is null returns null Rectangle
 - 
openTabpublic static boolean openTab(int tab) Opens the bank tab specified- Parameters:
- tab- integer value of tab that you want opened
- Returns:
- whether tab was successfully opened.
 
 - 
openTabpublic static boolean openTab(@NonNull BankTab tab) Opens theBankTabspecified.- Parameters:
- tab- The BankTab to open.
- Returns:
- True if BankTab was opened, else false
 
 - 
getBankHistoryCachepublic static @NonNull java.util.List<@Nullable Item> getBankHistoryCache() Gets the bank item history cache. The history cache is updated periodically as bank methods are called like withdraw, deposit, all- Returns:
- list of all your bank items since your last visit.
 
 - 
addToBankHistoryCachepublic static boolean addToBankHistoryCache(@NonNull Item item) This allows you to add an item to the bank history cache, it should only be necessary if you're doing things outside our API. If the cache already contains the given item, we'll add (or subtract if given an item with a negative amount) to the item's amount in cache.- Parameters:
- item- the item to add to the cache
- Returns:
- true if a cache exists and we add the item to it, false otherwise
 
 - 
getLastBankHistoryCacheTimepublic static long getLastBankHistoryCacheTime() Returns the last timestamp (using System#currentTimeMillis) of a cache update- Returns:
- timestamp of last cache update, or 0 if the bank cache hasn't been created yet
 
 - 
getLastBankHistoryCacheTickpublic static long getLastBankHistoryCacheTick() Returns the last game tick (usingClient.getGameTick()) of a cache update- Returns:
- game tick of last cache update, or 0 if the bank cache hasn't been created yet
 
 - 
isCachedpublic static boolean isCached() Checks if the bank has been cached.- Returns:
- true if we've cached the bank's items, false otherwise
 
 - 
getChildpublic static @Nullable WidgetChild getChild(int id) Gets theWidgetChildof theItemwith the given ID- Parameters:
- id- the id of the item
- Returns:
- WidgetChild of the item
 
 - 
getChildpublic static @Nullable WidgetChild getChild(@NonNull java.lang.String name) Gets theWidgetChildof theItemwith the given name- Parameters:
- name- the name of the item
- Returns:
- WidgetChild of the item
 
 - 
getChildpublic static @Nullable WidgetChild getChild(@NonNull Filter<Item> filter) - Parameters:
- filter- the filter used to find item.
- Returns:
- WidgetChild of the item
 
 - 
getChildpublic static @Nullable WidgetChild getChild(@NonNull Item item) Gets theWidgetChildof theItembased on the item's slot value- Parameters:
- item- Item to get the child of
- Returns:
- WidgetChild of the item
 
 - 
getChildForSlotpublic static @Nullable WidgetChild getChildForSlot(int slot) Gets the WidgetChild for the given slot- Parameters:
- slot- Bank slot to get the WidgetChild for.
- Returns:
- WidgetChild of the slot
 
 - 
getRearrangeModepublic static @NonNull BankMode getRearrangeMode() Gets the current rearrange mode type;- Returns:
- current rearrange mode wrapped in a BankModeobject.
 
 - 
isSlotVisiblepublic static boolean isSlotVisible(@NonNull Item item) Determines if the givenItem's slot is visible- Parameters:
- item- The item that the slot you are searching for contains.
- Returns:
- True if slot is visible, else false
 
 - 
getWithdrawModepublic static @NonNull BankMode getWithdrawMode() Gets the current withdrawBankMode- Returns:
- current withdraw mode either BankMode.ITEMorBankMode.NOTE
 
 - 
setWithdrawModepublic static boolean setWithdrawMode(@NonNull BankMode mode) Sets the withdraw mode, eitherBankMode.ITEMorBankMode.NOTE- Parameters:
- mode-- BankModeto switch to
- Returns:
- True if successfully switched, else false
 
 - 
setRearrangeModepublic static boolean setRearrangeMode(@NonNull BankMode mode) Sets the Rearrange mode for the bank eitherBankMode.SWAPorBankMode.INSERT- Parameters:
- mode-- BankMode
- Returns:
- true if successfully switched else false
 
 - 
getDefaultQuantitypublic static @NonNull BankQuantitySelection getDefaultQuantity() Gets the currently selected default quantity for withdraw or deposit actions
 - 
setDefaultQuantitypublic static boolean setDefaultQuantity(@NonNull BankQuantitySelection selection) Sets theBankQuantitySelectionfor bank actions- Parameters:
- selection-- BankQuantitySelection
- Returns:
- True if quantity successfully selected
 
 - 
placeHoldersEnabledpublic static boolean placeHoldersEnabled() Checks whether placeholders are currently enabled
 - 
togglePlaceholderspublic static boolean togglePlaceholders(boolean enabled) Toggles whether placeholders are enabled or not- Parameters:
- enabled- True/False
- Returns:
- True if placeholders successfully set to given boolean
 
 - 
needToScrollUppublic static boolean needToScrollUp(@NonNull Item item) Determines if it needs to scroll up in order to see the givenItem- Parameters:
- item- The item that you're looking for
- Returns:
- True if it needs to scroll up, else false
 
 - 
needToScrollDownpublic static boolean needToScrollDown(@NonNull Item item) Determines if it needs to scroll down for theItemto be visible- Parameters:
- item- The item you're looking for
- Returns:
- True if you need to scroll down, else false
 
 - 
needToScrollpublic static boolean needToScroll(@NonNull Item item) Determines if the bot needs to scroll to find theItem- Parameters:
- item- The item that you're checking for
- Returns:
- True if the bank needs to scroll up or down for the item to be visible
 
 - 
getRowpublic static int getRow(@NonNull Item item) Gets the row of theItem- Parameters:
- item- Item to find the row of
- Returns:
- Integer value of the row of the Item based on Item.getSlot()
 
 - 
getTabpublic static int getTab(@NonNull Item item) Gets the tab for theItem- Parameters:
- item- Item to get the tab of, based on- Item.getSlot()
- Returns:
- Integer value of the tab the item is in, 0 if not found
 
 - 
getTabpublic static int getTab(int slot) 
 - 
availableTabspublic static int availableTabs() Gets the number of tabs currently available- Returns:
- Integer value of the current amount of tabs available
 
 - 
countpublic static int count(@NonNull BankTab tab) Gets the Item count for the BankTab- Returns:
- Integer value with how many items are in the tab
 
 - 
getCurrentBankTabpublic static @Nullable BankTab getCurrentBankTab() Gets the currentBankTab- Returns:
- currently open BankTab, else null
 
 - 
getScrollHeightpublic static int getScrollHeight() Determines the current scroll position height of the bank's scroll container.- Returns:
- The current scroll position height of the bank's scroll container.
 
 - 
scrollpublic static boolean scroll(int id, @NonNull BankScroll type)Scrolls to the item with the given ID using theBankScrollscroll type- Parameters:
- id- the id of the item to scroll to.
- type- the method of scrolling you would like to use.
- Returns:
- true if the item is visible after scrolling.
 
 - 
scrollpublic static boolean scroll(int id) Scrolls to the item with the given ID seescroll(int, BankScroll)with a random choice of scroll types
 - 
scrollpublic static boolean scroll(@NonNull java.lang.String name, @NonNull BankScroll type)Scrolls to the item with the given name using the givenBankScrolltype- Parameters:
- name- the name of the item to scroll to.
- type- the method of scrolling you would like to use.
- Returns:
- true if the item is visible after scrolling.
 
 - 
scrollpublic static boolean scroll(@NonNull java.lang.String name) Scrolls to the item with the given name seescroll(String, BankScroll)with a randomBankScrolltype
 - 
scrollpublic static boolean scroll(@NonNull Filter<Item> filter, @NonNull BankScroll type) Scrolls to the item which matches the given filter using the givenBankScrolltype- Parameters:
- filter- the filter of the item to scroll to.
- type- the method of scrolling you would prefer to use, however it will always use the scroll wheel if you have more than 300 items in your bank or if you're on resizable mode
- Returns:
- true if the item is visible after scrolling.
 
 - 
scrollpublic static boolean scroll(@NonNull Filter<Item> filter) Scrolls to the item which matches the given filter. seescroll(Filter, BankScroll)with a randomizedBankScrolltype
 - 
updateCachepublic static void updateCache(@NonNull java.util.Collection<Item> items) Clears the bank history cache and fills it with the given collection of items, only works if bank is open- Parameters:
- items- collection of items to fill the bank cache with
 
 - 
updateCachepublic static void updateCache() Used for updating the bank cache, generally reserved for internal use but can be called in a script during custom banking This will clear the bank cache and update it with all bank items
 - 
depositpublic static boolean deposit(int id, int amount)
 - 
depositpublic static boolean deposit(@NonNull java.lang.String name, int amount)
 - 
depositpublic static boolean deposit(@NonNull Item item, int amount) 
 - 
depositAllExceptpublic static boolean depositAllExcept(@NonNull java.lang.String... names) 
 - 
depositAllExceptpublic static boolean depositAllExcept(@NonNull java.lang.Integer... ids) 
 - 
depositAllExceptpublic static boolean depositAllExcept(int[] ids) 
 - 
depositpublic static boolean deposit(int id) 
 - 
depositpublic static boolean deposit(@NonNull java.lang.String name) 
 - 
depositpublic static boolean deposit(@NonNull Item item) 
 - 
depositAllpublic static boolean depositAll(int id) 
 - 
depositAllpublic static boolean depositAll(@NonNull java.lang.String name) 
 - 
depositAllpublic static boolean depositAll(@NonNull Item item) 
 - 
fullSlotCountpublic static int fullSlotCount() Number of slots that contain non-null items Includes placeholders as a full slot
 - 
emptySlotCountpublic static int emptySlotCount() Number of slots that do not contain an item or placeholder
 - 
isSlotEmptypublic static boolean isSlotEmpty(int slot) Checks if the given slot contains an item
 - 
isSlotFullpublic static boolean isSlotFull(int slot) Checks if the slot has an Item in it
 - 
onlyContainspublic static boolean onlyContains(@NonNull java.lang.String... names) Checks if your Bank only contains items with specified names- Parameters:
- names- Names of items to look for
- Returns:
- True if Bank only contains items with the given names, else False
 
 - 
onlyContainspublic static boolean onlyContains(@NonNull java.lang.Integer... ids) Checks if your Bank only contains items with the specified IDs- Parameters:
- ids- IDs of items to check for
- Returns:
- True if Bank only contains items with the specified IDs, else False
 
 - 
onlyContainspublic static boolean onlyContains(int[] ids) 
 - 
onlyContainspublic static boolean onlyContains(@NonNull Filter<Item> f) Checks if your Bank only contains items that match the Filter- Parameters:
- f- Filter to pass items through
- Returns:
- True if Bank only contains items matching Filter, else False
 
 - 
slotContainspublic static boolean slotContains(int slot, @NonNull java.lang.String... names)Checks if the slot contains items that matches the given names.- Parameters:
- names- names of the items to check
- Returns:
- true if Bank only contains items matching Filter, else false
 
 - 
slotNameContainspublic static boolean slotNameContains(int slot, @NonNull java.lang.String sub)Checks if the slot has an item whose name contains the given sub string- Parameters:
- sub- the substring which will be used to search.
- Returns:
- True if Bank only contains items matching substring, else false.
 
 - 
slotContainspublic static boolean slotContains(int slot, @NonNull java.lang.Integer... ids)Checks if the slot contains an item with an ID matching one of the given ids- Parameters:
- ids- ids of the items to check.
- Returns:
- True if Bank slot contains one of the given ids, else false
 
 - 
slotContainspublic static boolean slotContains(int slot, int[] ids)
 - 
slotContainspublic static boolean slotContains(int slot, @NonNull Item t)Checks if the slot contains givenItem- Parameters:
- t- The item to check.
- Returns:
- True if Bank contains the given item in the given slot, else false
 
 - 
slotContainspublic static boolean slotContains(int slot, @NonNull Filter<Item> filter)Checks if the slot contains an item that matches the filter.- Parameters:
- filter- Filter to pass items through.
- Returns:
- True if Bank only contains an item matching the given Filter, else false.
 
 - 
getFirstEmptySlotpublic static int getFirstEmptySlot() Gets the first empty slot in the bank.- Returns:
- slot number, if bank is full -1.
 
 - 
getFirstFullSlotpublic static int getFirstFullSlot() Gets the next full slot in your bank- Returns:
- slot number, if bank is empty -1
 
 - 
getIdForSlotpublic static int getIdForSlot(int slot) Gets the ID of theItemin the slot.- Parameters:
- slot- Slot to get item id of.
- Returns:
- Item ID or -1 if no item.
 
 - 
getNameForSlotpublic static java.lang.String getNameForSlot(int slot) Gets the Name for the Item in the slot.- Parameters:
- slot- Slot to get item name of.
- Returns:
- Item name or "" if item is null.
 
 - 
getSlotpublic static int getSlot(int id) Gets the slot for the item with specified ID.- Parameters:
- id- ID of item to get slot of.
- Returns:
- Item slot or -1 if Item is null.
 
 - 
slot@Deprecated public static int slot(int id) Deprecated.seegetSlot(int)
 - 
getSlotpublic static int getSlot(@NonNull java.lang.String name) Gets the slot for the item with specified name.- Parameters:
- name- Name of item to get slot of.
- Returns:
- Item slot or -1 if Item is null.
 
 - 
slot@Deprecated public static int slot(@NonNull java.lang.String name) Deprecated.seegetSlot(String)
 - 
getSlotpublic static int getSlot(@NonNull Filter<Item> filter) Gets the slot for the first item that matches the given filter- Parameters:
- filter- filter of the item to get slot of.
- Returns:
- Item slot or -1 if no slots match the given filter.
 
 - 
slot@Deprecated public static int slot(@NonNull Filter<Item> filter) Deprecated.seegetSlot(Filter)
 - 
allpublic static @NonNull java.util.List<Item> all(@NonNull Filter<Item> filter) A list of all the non-null items that match the given filter Filters out null before checking against the filter- Parameters:
- filter- the filter to search with.
- Returns:
- the list of all filtered items.
 
 - 
getItemInSlotpublic static @Nullable Item getItemInSlot(int slot) Gets item in specified slot.- Parameters:
- slot- the slot.
- Returns:
- the item in slot.
 
 - 
getpublic static @Nullable Item get(int id) Gets the first item with the given id- Parameters:
- id- ID of the item to get
- Returns:
- Item that matches the given ID, or null if not found
 
 - 
getpublic static @Nullable Item get(@NonNull java.lang.Integer... ids) Gets the first Item that matches one of the given ids- Parameters:
- ids- ids to check for
- Returns:
- First item found or null if none found
 
 - 
getpublic static @Nullable Item get(int[] ids) Seeget(Integer...)
 - 
getpublic static @Nullable Item get(@NonNull java.lang.String name) Get the item for specified name.- Parameters:
- name- the name of the item.
- Returns:
- the item if list contains it, otherwise null.
 
 - 
getpublic static @Nullable Item get(@NonNull java.lang.String... names) Gets the first item that matches one of the given names- Parameters:
- names- Names of the items to look for
- Returns:
- The first item in the bank that matches one of the given names, else null if none found
 
 - 
exceptpublic static @NonNull java.util.List<Item> except(@NonNull Filter<Item> filter) Get all items which do not fit the given criteria. Ignores placeholders- Parameters:
- filter- The filter of the items to ignore.
- Returns:
- The list of items found which do not match the given criteria.
 
 - 
size@Deprecated public static int size() Deprecated.seefullSlotCount()
 - 
isEmptypublic static boolean isEmpty() Checks if the bank is empty (including placeholders)
 - 
containspublic static boolean contains(int id) Checks if the bank contains the given ID Placeholders are ignored- Parameters:
- id- the id
- Returns:
- true if contains, else false.
 
 - 
containspublic static boolean contains(@NonNull java.lang.String string) Determines if bank contains an item that matches the given name. Placeholders are ignored- Parameters:
- string- the name of the item.
- Returns:
- true if bank contains item, otherwise false.
 
 - 
containsAllpublic static boolean containsAll(@NonNull java.lang.String... names) Checks if your Bank contains all of the items with names specified Placeholders are ignored- Parameters:
- names- Names of items to check for
- Returns:
- True if Bank contains all names, else False
 
 - 
containsAllpublic static boolean containsAll(int[] ids) 
 - 
containsAllpublic static boolean containsAll(@NonNull java.lang.Integer... ids) Checks if your Bank contains all of the items with specified IDs Placeholders are ignored- Parameters:
- ids- IDs of items to check for
- Returns:
- True if Bank contains all IDs, else false.
 
 - 
containsAllpublic static boolean containsAll(@NonNull java.util.Collection<?> collection) Checks if your bank contains all of the items in the collection- Parameters:
- collection- The collection of items to compare against
- Returns:
- True if bank contains all of the items, else false.
 
 - 
containspublic static boolean contains(@NonNull java.lang.Integer... ids) Checks if your collection contains at least one item which meets one of the specified ids. Placeholders are ignored- Parameters:
- ids- Item IDs to check for
- Returns:
- True if contains one of, else false
 
 - 
containspublic static boolean contains(int[] ids) 
 - 
containspublic static boolean contains(@NonNull java.lang.String... names) Checks if your collection contains at least one item which meets one of the specified names. Placeholders are ignored- Parameters:
- names- names to check for
- Returns:
- true if contains one of, else false.
 
 - 
containspublic static boolean contains(@NonNull Filter<Item> filter) Checks if your collection contains at least one item which meets the specified filter. Placeholders are ignored- Parameters:
- filter- the filter to search with.
- Returns:
- true if contains one of, else false.
 
 - 
containspublic static boolean contains(@NonNull java.lang.Object o) Checks to see if the bank contains an item matching the given Object Placeholders are ignored- Parameters:
- o- Object to check for, could be Integer, String, Filter, or a given Item, all abstracted to 'Object'
- Returns:
- True if corresponding contains returns true, false if doesn't contain or cannot find a corresponding contains to call
 
 - 
isFullpublic static boolean isFull() Determines if bank is full.- Returns:
- true if full, else false
 
 - 
countpublic static int count(@NonNull java.lang.String name) Count of all the items that match the search. Placeholders are ignored- Parameters:
- name- the name of the item.
- Returns:
- the total count of matching items.
 
 - 
countpublic static int count(int id) Count of all the items that match the search. Placeholders are ignored- Parameters:
- id- the id of them item.
- Returns:
- the total count of matching items.
 
 - 
countpublic static int count(@NonNull java.lang.String... names) Count of all the items that match the search. Placeholders are ignored- Parameters:
- names- the names of the item.
- Returns:
- the total count of matching items.
 
 - 
countpublic static int count(@NonNull java.lang.Integer... ids) Count of all the items that match the search. Placeholders are ignored- Parameters:
- ids- the ids of them item.
- Returns:
- the total count of matching items.
 
 - 
countpublic static int count(int[] ids) 
 - 
countpublic static int count(@NonNull Filter<Item> filter) Count of all the items that match the search. Placeholders are ignored- Parameters:
- filter- the filter to count with
- Returns:
- the total count of matching items.
 
 - 
setpublic static @Nullable Item set(int index, @Nullable Item element) Sets anItemto the given slot Used internally, shouldn't really be touched by API users
 - 
dragpublic static boolean drag(int fromSlot, int toSlot)Drags the item from one slot to another, either of which can be empty to simply move an item from one slot to the other- Parameters:
- fromSlot- the first item's slot
- toSlot- the second item's slot
- Returns:
- true if the items are dragged successfully or if both slots are the same, false otherwise
 
 - 
getCustomWithdrawAmountpublic static int getCustomWithdrawAmount() 
 - 
isAlwaysOpenTabpublic static boolean isAlwaysOpenTab() 
 - 
setAlwaysOpenTabpublic static void setAlwaysOpenTab(boolean alwaysOpenTab) 
 
- 
 
-