Resolved Inventory item filter

Discussion in 'Developer Support' started by Geashaw, Jun 6, 2016.

  1. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,402
    Likes Received:
    248
    Was looking for a way to convert this method to allow for all kind of bones:

    private boolean gotBones {
    return Inventory.getItems("Dragon bones").results().size > 0;
    }
     
  2. Best Answer:
    Post #2 by Cloud, Jun 6, 2016
  3. Cloud

    Joined:
    Jul 28, 2013
    Messages:
    2,557
    Likes Received:
    922
    Inventory.newQuery().names(USE_A_REGEX_PATTERN_OBJECT_HERE).results().size() > 0;
     
    awesome123man likes this.
  4. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,402
    Likes Received:
    248
    Thanks, that's what I needed.
     

Share This Page

Loading...