Uses of Class
privbot.wrappers.PrivItem
Packages that use PrivItem
Package
Description
ctx.* facades: inventory, bank, NPCs, widgets, and the other one-liners.Fluent queries behind
ctx.npcs.query(), objects, ground items, and widgets.-
Uses of PrivItem in privbot.hooks
Methods in privbot.hooks that return PrivItemModifier and TypeMethodDescriptionstatic PrivItemStatic lookup through the process-wide adapter; preferctx.bank.get(pred).static PrivItemStatic lookup that needs noctx; preferctx.equipment.get(pred).static PrivItemStatic lookup that needs noctx; preferctx.inventory.get(pred).Same asBank.get(Predicate).Same asEquipment.get(Predicate).First inventory item matching any supplied name, ornull.Same asInventory.get(Predicate); Scar-style name.static PrivItemInventoryFoodQueries.firstByNamePatternsPreferEat(Inventory inventory, String... namePatterns) The first carried item whose name contains one ofnamePatterns, preferring items that listInventoryFoodQueries.EAT_ACTION(for servers whose item definitions report wrong actions); lowest potion dose, then lowest slot, first.static PrivItemInventoryFoodQueries.firstWithEatAction(Inventory inventory) The first carried item (no placeholders) whose actions includeInventoryFoodQueries.EAT_ACTION.Inventory.food()First inventory item with anEataction, ornull.First inventory slot matchingpred, or null.Methods in privbot.hooks with parameters of type PrivItemModifier and TypeMethodDescriptionstatic booleanInventoryFoodQueries.tryInteractEat(PrivItem food) Dispatches "Eat" onfood.Method parameters in privbot.hooks with type arguments of type PrivItemModifier and TypeMethodDescriptionstatic PrivItemStatic lookup through the process-wide adapter; preferctx.bank.get(pred).static PrivItemStatic lookup that needs noctx; preferctx.equipment.get(pred).static PrivItemStatic lookup that needs noctx; preferctx.inventory.get(pred).Same asBank.get(Predicate).Same asEquipment.get(Predicate).Same asInventory.get(Predicate); Scar-style name.First inventory slot matchingpred, or null. -
Uses of PrivItem in privbot.query
Methods in privbot.query that return PrivItemModifier and TypeMethodDescriptionItemQuery.first()The first remaining row (lowest slot first unless sorted), or null when empty.First slot matchingpredwithout mutating the fluent chain’s prior filters incorrectly — uses a stream view.Methods in privbot.query that return types with arguments of type PrivItemModifier and TypeMethodDescriptionItemQuery.list()An unmodifiable view of the remaining rows.static Comparator<PrivItem> ConsumableSelectionOrder.lowestPotionDoseThenLowestSlot()Prefer lowest dose tier (1 sip left) first, then earlier inventory slots for the same tier so one vial is drained via repeated ticks instead of one sip per matching item id.Method parameters in privbot.query with type arguments of type PrivItemModifier and TypeMethodDescriptionNarrows this query in place and returns it.First slot matchingpredwithout mutating the fluent chain’s prior filters incorrectly — uses a stream view.ItemQuery.sort(Comparator<PrivItem> comparator) Sort the working list in place (e.g.Alias ofItemQuery.filter(Predicate).